Underwater wireless optical communication (UWOC) has demonstrated high-speed and low-latency properties in clear and coastal ocean water because of the relatively low attenuation ‘window’ for blue–green wavelengths from 450 nm to 550 nm. However, there are different attenuation coefficients for transmission in ocean water at different wavelengths, and the light transmission more seriously deteriorates with fluctuations in the water turbidity. Therefore, traditional UWOC using a single wavelength or coarse blue–green wavelengths has difficulty tolerating variations in water turbidity. Dense wavelength division multiplexing (WDM) technology provides sufficient communication channels with a narrow wavelength spacing and minimal channel crosstalk. Here, we improve the UWOC in clear and coastal ocean water using dense blue–green WDM. A cost-effective WDM emitter is proposed with directly modulated blue–green laser diodes. Dense wavelength beam combination and collimation are demonstrated in a 20-metre underwater channel from 490 nm to 520 nm. Demultiplexing with a minimum channel spacing of 2 nm is realized by an optical grating. Remarkably, our WDM results demonstrate an aggregate data rate exceeding 10 Gbit/s under diverse water turbidity conditions, with negligible crosstalk observed for each channel. This is the densest WDM implementation with a record channel spacing of 2 nm and the highest channel count for underwater blue–green light communications, providing turbidity-tolerant signal transmission in clear and coastal ocean water.