The accumulation of bacteria in surface-attached biofilms can be detrimental to human health, dental hygiene, and many industrial processes. Natural biofilms are soft and often transparent, and they have heterogeneous biological composition and structure over micro- and macroscales. As a result, it is challenging to quantify the spatial distribution and overall intensity of biofilms. In this work, a new method was developed to enhance the visibility and quantification of bacterial biofilms. First, broad-spectrum biomolecular staining was used to enhance the visibility of the cells, nucleic acids, and proteins that make up biofilms. Then, an image analysis algorithm was developed to objectively and quantitatively measure biofilm accumulation from digital photographs and results were compared to independent measurements of cell density. This new method was used to quantify the growth intensity of Pseudomonas putida biofilms as they grew over time. This method is simple and fast, and can quantify biofilm growth over a large area with approximately the same precision as the more laborious cell counting method. Stained and processed images facilitate assessment of spatial heterogeneity of a biofilm across a surface. This new approach to biofilm analysis could be applied in studies of natural, industrial, and environmental biofilms. Graphical abstract A novel photographic method was developed to quantify bacterial biofilms. Broad spectrum biomolecular staining enhanced the visibility of the biofilms. Image analysis objectively and quantitatively measured biofilm accumulation from digital photographs. When compared to independent measurements of cell density the new method accurately quantified growth of Pseudomonas putida biofilms as they grew over time. The graph shows a comparison of biofilm quantification from cell density and image analysis. Error bars show standard deviation from three independent samples. Inset photographs show effect of staining Electronic supplementary material The online version of this article (doi:10.1007/s00216-015-9195-z) contains supplementary material, which is available to authorized users.