Vivianite is a secondary mineral found in several geological environments: the oxidation zone of metal ore deposits, in granitic pegmatites containing phosphate minerals, in clays and glauconitic sediments, as well as in recent alluvial deposits that replace organic matter such as peat, lignite, peatland iron ores, and forest soils (collectively). Bones and teeth buried in peatlands are sometimes replaced by vivianite. Sometimes, vivianite grows on corpses, but in these cases, only in small crystals.