It is unclear what the effects of taxes on sugar sweetened beverages (SSBs) are on consumer behaviour and which consumers may be affected the most. We evaluate the effect of the SSB tax introduced in Catalonia (but not in the rest of Spain) in May 2017 using loyalty card data of monthly purchases by 900,000 households from May 2016 to April 2018. Using a Difference-in-Differences approach, we study the SSB tax effect on the purchased quantity of beverages and sugar. Our results suggest a reduction in purchases of taxed beverages and a small increase in purchases of untaxed beverages. Households have substituted taxed beverages with their lower sugar (untaxed) counterparts. This has led to a 2.2% overall reduction in sugar purchases from beverages. Our study implies that although sin taxes moderately change consumer behaviour, a combination of different policies would be required to tackle obesity.