Microbial biofilms exhibit a self-produced matrix of extracellular polymeric substances (EPS), including polysaccharides, proteins, extracellular DNA and lipids. EPS promote interactions of the biofilm with other cells and sorption of organics, metals and chemical pollutants, and they facilitate cell adhesion at interfaces and ensure matrix cohesion. EPS have roles in various natural environments, such as soils, sediments and marine habitats. In addition, EPS are relevant in technical environments, such as wastewater and drinking water treatment facilities, and water distribution systems, and they contribute to biofouling and microbially influenced corrosion. In medicine, EPS protect pathogens within the biofilm against the host immune system and antimicrobials, and emerging evidence suggests that EPS can represent potential virulence factors. By contrast, EPS yield a wide range of valuable products that include their role in self-repairing concrete. In this Review, we aim to explore EPS as a functional unit of biofilms in the environment, in technology and in medicine.