Understanding of the processes that control CO2 concentrations in the aquatic environment has been hampered by the absence of a direct method to make continuous measurements over both short- and long-term time intervals. We describe an in situ method in which a non-dispersive infrared (NDIR) sensor is enclosed in a water impermeable, gas permeable polytetrafluoroethylene (PTFE) membrane and deployed in a freshwater environment. This allows measurements of CO2 concentration to be made directly at a specific depth in the water column without the need for pumps or reagents. We demonstrate the potential of the method using examples from different aquatic environments characterized by a range of CO2 concentrations (0·5–8·0 mg CO2-C l−1, equivalent to ca 40–650 µmol CO2 l−1). These comprise streams and ponds from tropical, temperate and boreal regions. Data derived from the sensor was compared with direct measurements of CO2 concentrations using headspace analysis. Sensor performance following long-term (>6 months) field deployment conformed to manufacturers' specifications, with no drift detected. We conclude that the sensor-based method is a robust, accurate and responsive method, with a wide range of potential applications, particularly when combined with other in situ sensor-based measurements of related variables. Copyright © 2009 John Wiley & Sons, Ltd.