Soil is a crucial component of the biosphere and is a major sink for organic carbon. Plant roots are known to release a wide range of carbon-based compounds into soils, including polysaccharides, but the functions of these are not known in detail. Using a monoclonal antibody to plant cell wall xyloglucan, we show that this polysaccharide is secreted by a wide range of angiosperm roots, and relatively abundantly by grasses. It is also released from the rhizoids of liverworts, the earliest diverging lineage of land plants. Using analysis of water-stable aggregate size, dry dispersion particle analysis and scanning electron microscopy, we show that xyloglucan is effective in increasing soil particle aggregation, a key factor in the formation and function of healthy soils. To study the possible roles of xyloglucan in the formation of soils, we analysed the xyloglucan contents of mineral soils of known age exposed upon the retreat of glaciers. These glacial forefield soils had significantly higher xyloglucan contents than detected in a UK grassland soil. We propose that xyloglucan released from plant rhizoids/roots is an effective soil particle aggregator and may, in this role, have been important in the initial colonization of land.