Microbial carbonates contain valuable chemical, isotopic and molecular information regarding the Precambrian Earth. They record shallow-water information complementary to deep ocean proxies, such as banded iron formation and black shale. Six groups of well-preserved stromatolites illustrate how the rare earth elements (REE) are used for chemical investigation. The first task is to test whether the REE inventory of carbonate is compromised by clastic, volcanic, or diagenetic contaminants. Once the cleanliness has been verified, the shale-normalized REE pattern can be used to distinguish between marine and lacustrine settings. For marine carbonates, it is possible to distinguish between restricted basin and open marine settings and for thick platform limestones the relative water depth can be inferred from REE systematics. The studied shallow-water stromatolites range in age from 2.52 to 3.45 Ga. They contain no evidence from the behaviour of the redox-sensitive element cerium that free oxygen levels in the shallow sea approached concentrations beyond a trace gas by 2.52 Ga. Compared with abiotic early diagenetic marine carbonate cements, microbial carbonate is strongly enriched in REE. This may itself not yet serve as a biomarker, but it is regarded as a necessary prerequisite for a sample to qualify for biomarker studies.