Abstract. Maximizing the pedestal height while maintaining acceptable ELMs is a key issue for optimizing tokamak performance. We present a model for ELMs and pedestal constraints based upon theoretical analysis of edge instabilities which can limit the pedestal height and drive ELMs. Sharp pedestal pressure gradients drive large bootstrap currents which play a complex dual role in the stability physics. Consequently, the dominant modes are often intermediate-n coupled ``peeling-ballooning'' modes, driven both by current and the pressure gradient. A highly efficient new MHD code, ELITE, is used to study these modes, and calculate quantitative stability constraints on the pedestal, including direct constraints on the pedestal height. A model of various ELM types is developed, and quantitatively compared to data from several tokamaks. A number of observations agree with predictions, including ELM onset times, ELM depth, and variation in pedestal height with discharge shape. Projections of pedestal stability constraints for Next Step designs, and nonlinear simulations of peeling-ballooning modes using the BOUT code are also presented. *Work supported by U.S. DOE under Grant DE-FG03-95ER54309.