We measured 135 cross sections of residual nuclei produced in fragmentation reactions of C12, N14, and O13−16,20,22 projectiles impinging on a carbon target at kinetic energies of near 400A MeV, most of them for the first time, with the RB3/LAND setup at the GSI facility in Darmstadt (Germany). The use of this state-of-the-art experimental setup in combination with the inverse kinematics technique gave the full identification in atomic and mass numbers of fragmentation residues with a high precision. The cross sections of these residues were determined with uncertainties below 20% for most of the cases. These data are compared to other previous measurements with stable isotopes and are also used to benchmark different model calculations.