The assessment of the equilibrium and the safety of masonry vaults is of high relevance for the conservation and restoration of historical heritage. In the literature many approaches have been proposed for this tasks, starting from the 17th century. In this work we focus on the Membrane Equilibrium Analysis, developed under the Heyman’s theory of Limit Analysis. Within this theory, the equilibrium of a vault is assessed if it is possible to find at least one membrane surface, between the volume of the vaults, being in equilibrium under the given loads through a purely compressive stress field. The equilibrium of membranes is described by a second order partial differential equation, which is definitely elliptic only when a negative semidefinite stress is assigned, and the shape is the unknown of the problem. The proposed algorithm aims at finding membrane shapes, entirely comprised between the geometry of the vault, in equilibrium with admissible stress fields, through the minimization of an error function with respect to shape parameters of the stress potential, and then, with respect to the boundary values of the membrane shape. The application to two test cases shows the viability of this tool for the assessment of the equilibrium of existing masonry vaults.