This work deals with the optimization of two-stage membrane systems for H2 separation from off-gases in hydrocarbons processing plants to simultaneously attain high values of both H2 recovery and H2 product purity. First, for a given H2 recovery level of 90%, optimizations of the total annual cost (TAC) are performed for desired H2 product purity values ranging between 0.90 and 0.95 mole fraction. One of the results showed that the contribution of the operating expenditures is more significant than the contribution of the annualized capital expenditures (approximately 62% and 38%, respectively). In addition, it was found that the optimal trade-offs existing between process variables (such as total membrane area and total electric power) depend on the specified H2 product purity level. Second, the minimization of the total power demand and the minimization of the total membrane area were performed for H2 recovery of 90% and H2 product purity of 0.90. The TAC values obtained in the first and second cases increased by 19.9% and 4.9%, respectively, with respect to that obtained by cost minimization. Finally, by analyzing and comparing the three optimal solutions, a strategy to systematically and rationally provide ‘good’ lower and upper bounds for model variables and initial guess values to solve the cost minimization problem by means of global optimization algorithms is proposed, which can be straightforward applied to other processes.