Calcium phosphates and calcium carbonates are among the most prevalent minerals involved in microbial fossilization. Characterization of both the organic and mineral components in biomineralized samples is, however, usually difficult at the appropriate spatial resolution (i.e. at the submicrometer scale). Scanning transmission X-ray microscopy (STXM) was used to measure C K-edge, P L-edge, and Ca L-edge near-edge X-ray absorption fine structure (NEXAFS) spectra of some calcium-containing minerals common in biomineralization processes and to study the experimental biomineralization by the model microorganism, Caulobacter crescentus. We show that the Ca L2,3-edges for hydroxyapatite, calcite, vaterite, and aragonite are unique and can be used as probes to detect these different mineral phases. Using these results, we showed that C. crescentus cells, when cultured in the presence of high calcium concentration, precipitated carbonate hydroxyapatite. In parallel, we detected proteins, polysaccharides, and nucleic acids in the mineralizing bacteria at the single-cell scale. Finally, we discussed the utility of STXM for the study of natural fossilized microbial systems.