Nonlinear stability is analysed for stationary solutions of incompressible inviscid stratified fluid flow in two and three dimensions. Both the Euler equations and their Boussinesq approximations are treated. The techniques used were initiated by Arnold around 1965. These techniques combine energy methods, conserved quantities and convexity estimates. The resulting nonlinear stability criteria involve standard quantities, such as the Richardson number, but they differ from the linearized stability criteria. For example, the full three-dimensional problem has nonlinearly stable stationary solutions with Richardson number greater than unity, provided the gradients of the variations in density satisfy explicitly given bounds. Specific examples and the associated Hamiltonian structures for the problems are given.