There are five known taste modalities in humans: sweet, bitter, sour, salty and umami (the taste of monosodium glutamate). Although the fruitfly Drosophila melanogaster tastes sugars, salts and noxious chemicals, the nature and number of taste modalities in this organism is not clear. Previous studies have identified one taste cell population marked by the gustatory receptor gene Gr5a that detects sugars, and a second population marked by Gr66a that detects bitter compounds. Here we identify a novel taste modality in this insect: the taste of carbonated water. We use a combination of anatomical, calcium imaging and behavioural approaches to identify a population of taste neurons that detects CO2 and mediates taste acceptance behaviour. The taste of carbonation may allow Drosophila to detect and obtain nutrients from growing microorganisms. Whereas CO2 detection by the olfactory system mediates avoidance, CO2 detection by the gustatory system mediates acceptance behaviour, demonstrating that the context of CO2 determines appropriate behaviour. This work opens up the possibility that the taste of carbonation may also exist in other organisms.