Stromatolites are found throughout the geological record and have received strong attention because they provide precious information about paleoenvironments and microbial paleobiodiversity. However, while this information is interpreted based on our knowledge about modern analogs, the latter remains incomplete. Here, we investigated the environmental and biological information recorded by modern stromatolites in Mari Ermi, a coastal pond in Western Sardinia that experiences severe seasonal evaporation and large salinity variations. For this purpose, we combined a variety of analytical tools, allowing to characterize the mineralogical composition of these stromatolites from the bulk, centimeter-scale to the nanometer-scale and assess the spatial distribution of the mineral phases. In particular, we used quantified x-ray elemental maps provided by energy dispersive x-ray spectrometry analyses coupled with scanning electron microscopy (SEM-EDXS). These maps were processed using an innovative data treatment allowing (i) mineral phase recognition, (ii) assessment of the mineral formula of each phase and (iii) mapping of their spatial distribution with a spatial resolution down to a hundred nanometers. Overall, this proved as an efficient approach to unravel mineralogical heterogeneities and detect informative mineral phases overlooked by bulk analyses. Mari Ermi stromatolites were mostly composed of magnesian calcite with an average Mg/Ca of ~0.1–0.2 as indicated by bulk analyses. However, microscopy observations revealed variable Mg-contents of calcite with a specific distribution, the most Mg-enriched calcites (Mg/Ca up to ~0.5) being systematically distributed around microbial remnants. Moreover, Mari Ermi stromatolites comprised an alternation of Mg-richer and Mg-poorer laminae, which paralleled the varying enrichment in microbial remnants of alternating laminae. The combination of SEM-EDXS, focused ion beam milling and transmission electron microscopy allowed to detect several minor phases, hardly or not detected at all by bulk analyses, such as aragonite, a variety of clay minerals as well as a gypsum-like phase. An additional calcium sulfate phase, best interpreted as S-apatite (cesanite), was detected by SEM-EDXS. Overall, this mineral assemblage and its definite spatial distribution record only discrete stages of the evaporation of Mari Ermi lagoon. Moreover, microorganisms seem to have a major control on Mg substitution in calcite. As a result, the dynamics of microbial populations, influenced by the salinity variations induced by evaporation in the lagoons, generates the formation of laminae in Mari Ermi stromatolites.