Blue carbon ecosystems, including salt marshes, play an important role in the global carbon cycle because of their high-efficiency storage of organic carbon (OC) in soils. Few studies focus on the origin of OC stored in salt-marsh soils, which is either allochthonous or autochthonous. The origin, however, has important implications for carbon crediting approaches because the alternative fate of allochthonous OC (AllOC), i.e. if it had not accumulated in the blue carbon ecosystem, is unclear. Here, we assessed the origin of OC in 2 mainland salt-marsh sites of the European Wadden Sea, analyzing δ13C of topsoil (0-5 cm) samples, freshly deposited sediment (allochthonous source), and aboveground and belowground biomass of vegetation (autochthonous sources). We tested for effects of geomorphological factors, including elevation and the distance to sediment sources, and of livestock grazing, as the most important land-use form, on the relative contributions of allochthonous versus autochthonous sources to the topsoil OC stock. A negative effect of distance to the creek on the relative contribution of AllOC was found at only 1 of the 2 salt marshes, probably due to differences in micro-topography between the 2 salt marshes. Additionally, the relative contribution of AllOC increased with increasing distance to the marsh edge in areas without livestock grazing, while it decreased in grazed areas. Our findings demonstrate that spatial factors such as surface elevation and distance to a sediment source, which have been found to determine the spatial patterns of sediment deposition, are also important factors determining the relative contribution of AllOC to topsoil OC stocks of salt marshes. Furthermore, we provide the first evidence that livestock grazing can reduce the relative contribution of AllOC to the soil OC stock. These findings thereby yield important implications for carbon crediting and land-use management.