We numerically follow the nonlinear evolution of the Parker instability in the presence of phase transitions from a warm to a cold H I interstellar medium in two spatial dimensions. The nonlinear evolution of the system favours modes that allow the magnetic field lines to cross the galactic plane. Cold H I clouds form with typical masses 10 5 M , mean densities 20 cm −3 , mean magnetic-field strengths 4.3 μG (rms field strengths 6.4 μG), mass-toflux ratios 0.1-0.3 relative to critical, temperatures 50 K, (two-dimensional) turbulent velocity dispersions 1.6 km s −1 and separations 500 pc, in agreement with observations. The maximum density and magnetic-field strength are 10 3 cm −3 and 20 μG, respectively. Approximately 60 per cent of all H I mass is in the warm neutral medium. The cold neutral medium is arranged into sheet-like structures both perpendicular and parallel to the galactic plane, but it is also found almost everywhere in the galactic plane, with the density being highest in valleys of the magnetic field lines. 'Cloudlets' also form whose physical properties are in quantitative agreement with those observed for such objects by Heiles. The nonlinear phase of the evolution takes 30 Myr, so that, if the instability is triggered by a nonlinear perturbation such as a spiral density shock wave, interstellar clouds can form within a time suggested by observations.