The grapsid crab Chasmagnathus granulata populates brackish-water lagoons and other estuarine environments. In its reproduction, this species follows a strategy of larval export, i.e. its larvae live under different salinity conditions from the juveniles and adults. In the present experimental investigation, ontogenetic changes in the capability for osmoregulation were studied in all 4 zoeal stages, the megalopa, the juvenile crab instars I, II and IV, and adults (all reared in seawater, 32). Moreover, we studied effects of embryonic and larval acclimation on osmoregulation. The zoea I larvae were slight hyper-regulators at low salinities (10 to 17) and hyper-osmoconformers at higher salinities. Stages II to IV zoe generally hyper-osmoconformers. At metamorphosis to the megalopa, the type of osmoregulation changed to hyper-hypo-regulation. The osmoregulatory capacities under both hypo- and hypersaline conditions increased strongly in the crab I and throughout later juvenile development. These patterns in osmoregulation match the ontogenetic changes that typically occur in the ecology of C. granulata: the zoea I hatches in brackish estuarine waters, where the juveniles and adults live, before it is exported to coastal marine zones. This initial larval stage is euryhaline and capable of hyper-osmoregulation at low salinities. The same capabilities were observed in the megalopa, which re-invades the brackish adult environment. This stage is known to settle in semiterrestrial habitats near the adult burrows, where both brackish and hypersaline conditions are likely to occur; this coincides with the first ontogenetic appearance of the hyper-hypo-osmoregulation pattern. The zoeal stages II, III and IV, in contrast, develop in the adjacent sea, where the salinity is higher and more stable. Correspondingly, these intermediate larval stages were found to be stenohaline osmoconformers. Preceding exposure of the eggs and larvae to a reduced salinity (20) enhanced the hyper-osmoregulatory capacity at low salinities (5 to 10) in all zoeal stages. This indicates an effect of non-genetic acclimation and, hence, phenotypic plasticity. This trait should have an adaptive value, as it increases the chance larval survival, at least in the initial larval stage, which is in the field exposed to highly variable, mostly reduced salinities.