A number of applications require x rays of both high flux and narrow bandwidth. In this work, we experimentally demonstrate the high-efficiency generation of narrowband soft x rays from carbon nanotube foams irradiated by a femtosecond laser pulse at an intensity of 1019W/cm2. The building blocks of the foam, single-walled carbon nanotube bundles with diameters smaller than the laser skin length can be volumetrically heated and fully ionized on a femtosecond time scale. The three-dimensional network structure of the foam permits deep penetration and drastic absorption of the laser pulse, and results in bright line emissions without prominent Stark broadening. A single-shot yield of 3×1014photons in the carbon Lyα line at 3.37 nm was measured with a bandwidth of 0.013 nm.