Pervasive dolomites occur preferentially in the stromatoporoid biostromal (or reefal) facies in the basal Devonian (Givetian) carbonate rocks in the Guilin area, South China. The amount of dolomites, however, decreases sharply in the overlying Frasnian carbonate rocks. Dolostones are dominated by replacement dolomites with minor dolomite cements. Replacement dolomites include: (1) fine to medium, planar-e floating dolomite rhombs (Rd1); (2) medium to coarse, planar-s patchy/mosaic dolomites (Rd2); and (3) medium to very coarse non-planar anhedral mosaic dolomites (Rd3). They post-date early submarine cements and overlap with stylolites. Two types of dolomite cements were identified: planar coarse euhedral dolomite cements (Cd1) and non-planar (saddle) dolomite cements (Cd2); they post-date replacement dolomites and predate late-stage calcite cements that line mouldic vugs and fractures. The replacement dolomites have δ18O values from −13·7 to −9·7‰ VPDB, δ13C values from −2·7 to + 1·5‰ VPDB and 87Sr/86Sr ratios from 0·7082 to 0·7114. Fluid inclusion data of Rd3 dolomites yield homogenization temperatures (Th) of 136–149 °C and salinities of 7·2–11·2 wt% NaCl equivalent. These data suggest that the replacive dolomitization could have occurred from slightly modified sea water and/or saline basinal fluids at relatively high temperatures, probably related to hydrothermal activities during the latest Givetian–middle Fammenian and Early Carboniferous times. Compared with replacement dolomites, Cd2 cements yield lower δ18O values (−14·2 to −9·3‰ VPDB), lower δ13C values (−3·0 to −0·7‰ VPDB), higher 87Sr/86Sr ratios (≈ 0·7100) and higher Th values (171–209 °C), which correspond to trapping temperatures (Tr) between 260 and 300 °C after pressure corrections. These data suggest that the dolomite cements precipitated from higher temperature hydrothermal fluids, derived from underlying siliciclastic deposits, and were associated with more intense hydrothermal events during Permian–Early Triassic time, when the host dolostones were deeply buried. The petrographic similarities between some replacement dolomites and Cd2 dolomite cements and the partial overlap in 87Sr/86Sr and δ18O values suggest neomorphism of early formed replacement dolomites that were exposed to later dolomitizing fluids. However, the dolomitization was finally stopped through invasion of meteoric water as a result of basin uplift induced by the Indosinian Orogeny from the early Middle Triassic, as indicated by the decrease in salinities in the dolomite cements in veins (5·1–0·4 wt% NaCl equivalent). Calcite cements generally yield the lowest δ18O values (−18·5 to −14·3‰ VPDB), variable δ13C values (−11·3 to −1·2‰ VPDB) and high Th values (145–170 °C) and low salinities (0–0·2 wt% NaCl equivalent), indicating an origin of high-temperature, dilute fluids recharged by meteoric water in the course of basin uplift during the Indosinian Orogeny. Faults were probably important conduits that channelled dolomitizing fluids from the deeply buried siliciclastic sediments into the basal carbonates, leading to intense dolomitization (i.e. Rd3, Cd1 and Cd2).