Aims. We present a 8• × 6• , high resolution extinction map of the Pipe nebula using 4.5 million stars from the Two Micron All Sky Survey (2MASS) point source catalog. Methods. The use of N , A&A, 377, 1023, a robust and optimal technique to map the dust column density, allows us to detect a A V = 0.5 mag extinction at a 3-σ level with a 1 arcmin resolution. Results. (i) We find for the Pipe nebula a normal reddening law,We measure the cloud distance using Hipparchos and Tycho parallaxes, and obtain 130 +24 −58 pc. This, together with the total estimated mass, 10 4 M , makes the Pipe the closest massive cloud complex to Earth. (iii) We compare the N extinction map to the NANTEN 12 CO observations and derive with unprecedented accuracy the relationship between the near-infrared extinction and the 12 CO column density and hence (indirectly) the 12 CO X-factor, that we estimate to be 2.91 × 10 20 cmWe identify approximately 1500 OH/IR stars located within the Galactic bulge in the direction of the Pipe field. This represents a significant increase of the known numbers of such stars in the Galaxy. Conclusions. Our analysis confirms the power and simplicity of the color excess technique to study molecular clouds. The comparison with the NANTEN 12 CO data corroborates the insensitivity of CO observations to low column densities (up to approximately 2 mag in A V ), and shows also an irreducible uncertainty in the dust-CO correlation of about 1 mag of visual extinction.