Sulfuric acid decomposition is the critical reaction in sulfur-iodide thermochemical cycle to produce oxygen. Sulfuric acid can decompose spontaneously into sulfur trioxide (SO3) and water, and SO3 continues to decompose into oxygen and sulfur dioxide. The application of membrane reactor can effectively improve the conversion rate of SO3 and thermal efficiency of sulfur-iodide cycle. The decomposition of SO3 requires the absorption of a large amount of heat due to its highly endothermic properties, and there are many irreversible processes such as heat transfer, mass transfer, chemical reaction and friction flow in the SO3 membrane reactor. Therefore, it is necessary to conduct thermodynamic analysis and optimization of the decomposition process to reduce the irreversible loss of the membrane reactor system. In this paper, a finite time thermodynamic model of SO3 decomposition membrane reactor is established, and the kinetic parameters of decomposition reaction are deduced and calculated based on experimental data. Firstly, the membrane reactor heated by hot helium gas is solved and used as reference reactor. Secondly, optimal control theory is used to optimize the reference reactor under fixed reactant inlet conditions and outlet conversion rate with total entropy generation rate minimization as optimization objective. The total entropy generation rate of Opt-1 reactor is reduced by 32.7% compared with the reference value. For variable reactor length, the total entropy generation rate of Opt-2 reactor is quadratic optimum at L=0.72 m, which is 34.7% less than the reference value. It is found that the reduction of total entropy generation rate in optimal reactors is mainly achieved by minimizing the entropy generation rate in heat transfer process. The distribution of local entropy generation rate is relatively uniform in the middle position, approximately consistent with the principle of equalization of entropy production rate. The conclusions obtained herein can provide guidelines for the energy-saving design of SO3 decomposition membrane reactors.