We establish the nonlinear stability of N-soliton solutions of the modified Korteweg–de Vries (mKdV) equation. The N-soliton solutions are global solutions of mKdV behaving at (positive and negative) time infinity as sums of one-solitons with speeds 0 < c 1 <…< c N . The proof relies on the variational characterization of N-solitons. We show that the N-solitons realize the local minimum of the (N + 1)th mKdV conserved quantity subject to fixed constraints on the N first conserved quantities. To this aim, we construct a functional for which N-solitons are critical points, we prove that the spectral properties of the linearization of this functional around an N-soliton are preserved on the extended timeline, and we analyze the spectrum at infinity of linearized operators around one-solitons. The main new ingredients in our analysis are a new operator identity based on a generalized Sylvester law of inertia and recursion operators for the mKdV equation.