Bacteria adhere to natural and engineered surfaces and develop into mature biofilms encased in self-produced extracellular polymeric substances (EPSs). EPS consists of polysaccharides, proteins, metabolites and extracellular DNA (eDNA). Extracellular DNA release by bacteria is mediated by both quorum-sensing (QS)-dependent and -independent mechanisms. Quorum-sensing-independent mechanisms are responsible for basal levels of eDNA release, whereas QS-dependent mechanisms control the production of prophages, phenazines and proteins involved in cell lysis and subsequent release of elevated amounts of eDNA. Extracellular DNA binds with other biopolymers such as polysaccharides, proteins or metabolites like phenazines, thereby providing structural integrity to EPS. Extracellular DNA promotes attractive acid–base interactions between bacterial cells and between bacteria and surfaces. It therefore plays an essential structural role in stabilising biofilms and protecting bacterial cells from physical and chemical challenges. Accordingly, with current knowledge, it becomes clear that targeting and destroying eDNA in bacterial EPS is a promising strategy for treatment of bacterial-associated infections in a medical context and biofilm control on surfaces to prevent biocorrison in an engineering context. In contrast, the addition of DNA can be applied to engineering of biofilms for beneficial purposes such as remediation of environmental pollutants and electricity or fuel production in bioelectrochemical systems or bioreactors.