The mechanical compaction behavior of shallow marine carbonate sediments has been investigated to develop carbonate compaction algorithms and decompaction curves that can be used in stratigraphic restoration, backstripping analyses, and quantitative models for simulation of carbonate stratigraphy. Deep-water chalks and calcareous oozes are not treated here. Empirical porosity-depth data for carbonate sediments have been compiled and compared with experimentally derived compaction curves to derive appropriate porosity-depth curves for shallow-water carbonate muds and sands. The curves are exponential in form. This review indicates that mud-rich shallow marine carbonates behave differently than sand-rich, grain-supported sediments with regard to reduction in porosity and thickness. Quantitative analysis of compaction behavior in carbonate sediments reveals that, barring early cementation, carbonate muds suffer significant thickness reduction early in their burial history and at shallow depths, e.g., 50% thickness reduction with about 150-200 m overburden. However, primary porosities of carbonate muds, approximately 70-80%, are reduced only to about 42% under that overburden. Thus, the potential exists for significant retention of primary porosity in carbonate muds in the form of microporosity. This indicates that interparticle cementation, with or without chemical compaction, is required to transform muddy carbonate sediments into lithified rock. In the absence of early lithification, carbonate sands compact more slowly than muds. Primary interparticle porosities of about 40-45% can be maintained in the first 200-300 m of burial, with little thickness reduction.