A knowledge of the mechanical properties of bacterial biofilms is required to more fully understand the processes of biofilm formation such as initial adhesion or detachment. The main contribution of this article is to demonstrate the use of homogenization techniques to compute mechanical parameters of Pseudomonas aeruginosa PAO1 biofilms. For this purpose, homogenization techniques are used to analyze freeze substitution electron micrographs of the biofilm cross-sections. The concept of a representative volume element and the study about his representativeness allows us to determine the optimal size in order to analyze these biofilm images. Results demonstrate significant heterogeneities with respect to stiffness and these can be explained by varying cell density distribution throughout the bacterial biofilms. These stiffness variations lead to different mechanical properties along the height of the biofilm. Moreover, a numerical shear stress test shows the impact of these heterogeneities on the detachment process. Several modes of detachment are highlighted according to the local strain energy in the different parts of the biofilm. Knowing where, and how, a biofilm may detach will allow better prediction of accumulation and biomass detachment. Biotechnol. Bioeng. 2013; 110: 1405–1418. © 2012 Wiley Periodicals, Inc.