A new approach for quantification of extracellular DNA (eDNA) in mixed biofilms at microscale resolution was developed and combined with other staining techniques to assess the origin, abundance and role of eDNA in activated sludge biofilms. Most eDNA was found in close proximity to living cells in microcolonies, suggesting that most of it originated from an active secretion or alternatively, by lysis of a sub-population of cells. When the staining was combined with fluorescence in situ hybridization for identification of the microorganisms, it was found that the eDNA content varied among the different probe-defined species. The highest amount of eDNA was found in and around the microcolonies of denitrifiers belonging to the genera Curvibacter and Thauera, the ammonium-oxidizing Nitrosomonas and the nitrite-oxidizing Nitrospira. Other floc-formers also produced eDNA, although in lower amounts. The total eDNA content in activated sludge varied from 4 to 52 mg per gram volatile suspended solids in different wastewater treatment plants. Very high local concentrations within some microcolonies were found with up to approximately 300 mg of eDNA per g of organic matter. DNase digestion of activated sludge led to general floc disintegration and disruption of the microcolonies with high eDNA content, implying that eDNA was an important structural component in activated sludge biofilms.