  The initial value problems for the Korteweg-de Vries (KdV) and modified KdV
(mKdV) equations under periodic and decaying boundary conditions are
considered. These initial value problems are shown to be globally well-posed in
all $L^2$-based Sobolev spaces $H^s$ where local well-posedness is presently
known, apart from the $H^{{1/4}} (\R)$ endpoint for mKdV. The result for KdV
relies on a new method for constructing almost conserved quantities using
multilinear harmonic analysis and the available local-in-time theory. Miura's
transformation is used to show that global well-posedness of modified KdV is
implied by global well-posedness of the standard KdV equation.
