Column-density maps of molecular clouds are one of the most important observables in the context of molecular cloud-and starformation (SF) studies. With the Herschel satellite it is now possible to precisely determine the column density from dust emission, which is the best tracer of the bulk of material in molecular clouds. However, line-of-sight (LOS) contamination from fore-or background clouds can lead to overestimating the dust emission of molecular clouds, in particular for distant clouds. This implies values that are too high for column density and mass, which can potentially lead to an incorrect physical interpretation of the column density probability distribution function (PDF). In this paper, we use observations and simulations to demonstrate how LOS contamination affects the PDF. We apply a first-order approximation (removing a constant level) to the molecular clouds of Auriga and Maddalena (low-mass star-forming), and Carina and NGC 3603 (both high-mass SF regions). In perfect agreement with the simulations, we find that the PDFs become broader, the peak shifts to lower column densities, and the power-law tail of the PDF for higher column densities flattens after correction. All corrected PDFs have a lognormal part for low column densities with a peak at A v ∼ 2 mag, a deviation point (DP) from the lognormal at A v (DP) ∼ 4−5 mag, and a power-law tail for higher column densities. Assuming an equivalent spherical density distribution ρ ∝ r −α , the slopes of the power-law tails correspond to α PDF = 1.8, 1.75, and 2.5 for Auriga, Carina, and NGC 3603. These numbers agree within the uncertainties with the values of α ≈ 1.5, 1.8, and 2.5 determined from the slope γ (with α = 1 − γ) obtained from the radial column density profiles (N ∝ r γ ). While α ∼ 1.5−2 is consistent with a structure dominated by collapse (local free-fall collapse of individual cores and clumps and global collapse), the higher value of α > 2 for NGC 3603 requires a physical process that leads to additional compression (e.g., expanding ionization fronts). From the small sample of our study, we find that clouds forming only low-mass stars and those also forming high-mass stars have slightly different values for their average column density (1.8 × 10 21 cm −2 vs. 3.0 × 10 21 cm −2 ), and they display differences in the overall column density structure. Massive clouds assemble more gas in smaller cloud volumes than low-mass SF ones. However, for both cloud types, the transition of the PDF from lognormal shape into power-law tail is found at the same column density (at A v ∼ 4−5 mag). Low-mass and high-mass SF clouds then have the same low column density distribution, most likely dominated by supersonic turbulence. At higher column densities, collapse and external pressure can form the power-law tail. The relative importance of the two processes can vary between clouds and thus lead to the observed differences in PDF and column density structure.