The near-infrared photoluminescence intrinsic to semiconducting single-walled carbon nanotubes is ideal for biological imaging owing to the low autofluorescence and deep tissue penetration in the near-infrared region beyond 1 microm. However, biocompatible single-walled carbon nanotubes with high quantum yield have been elusive. Here, we show that sonicating single-walled carbon nanotubes with sodium cholate, followed by surfactant exchange to form phospholipid-polyethylene glycol coated nanotubes, produces in vivo imaging agents that are both bright and biocompatible. The exchange procedure is better than directly sonicating the tubes with the phospholipid-polyethylene glycol, because it results in less damage to the nanotubes and improves the quantum yield. We show whole-animal in vivo imaging using an InGaAs camera in the 1-1.7 microm spectral range by detecting the intrinsic near-infrared photoluminescence of the 'exchange' single-walled carbon nanotubes at a low dose (17 mg l(-1) injected dose). The deep tissue penetration and low autofluorescence background allowed high-resolution intravital microscopy imaging of tumour vessels beneath thick skin.