Corrosion inhibition of SAE 1018 steel by Pseudomonas fragi andEscherichia coli biofilms has been evaluated using batch cultures in rich medium (LB) and seawater-mimicking medium (VNSS) at 23 °C and 30°C with or without daily medium replenishment. Biofilm components have been stained simultaneously for polysaccharide (calcofluor) and live and dead cells (Live/Dead Baclit viability kit) and visualized using confocal scanning laser microscopy (CSLM). Image analysis was used to quantify the relative proportions of live cells, dead cells, polysaccharide and void space in the biofilm. This staining technique and examination of the architecture of biofilms responsible for inhibiting metal corrosion revealed that both Ps. fragi and E. coli produce polysaccharide only in the seawater medium; in rich medium, the biofilm consisted mainly of a layer of sessile cells near the biofilm-metal interface and sparse thick clumps of cells at the biofilm-liquid interface. Biofilms of both strains had a higher proportion of live cells in the rich medium than in the seawater-mimicking medium at the higher temperature, and more live cells were present at the higher temperature for LB medium. The corrosion inhibition observed (2·3-6·9-fold in 8 d) was not significantly affected by medium type or replenishment. Increase in the cellular content of the biofilms, as a result of increasing temperature, led to a reduction in corrosion.