Despite its potential for curbing greenhouse gas emissions, carbon taxation encounters strong public resistance. However, acceptability depends on how tax revenues are used. We test the hypothesis that mental accounting theory can both explain systematic patterns in citizens’ preferences, such as the support for environmental earmarking, and help design a carbon tax scheme that is both acceptable and fair. Across six experiments conducted in the United Kingdom and in France (Ntotal = 7100), we show that: (a) There is an acceptability boost when the use of tax revenues matches the tax domain thematically (e.g., allocating carbon tax revenues to green projects), as demonstrated by an interaction effect between the tax domain and the expenditure domain on the level of tax support. This result is consistent with the use of a mental accounting heuristic, by which people create mental budgets where the origin of revenues is matched thematically with their domain of use. (b) Carbon tax acceptability varies with the proportion of tax revenues earmarked for green projects. (c) A mixed carbon tax scheme, in which most revenues are earmarked for green projects and the rest is redistributed to low-income households to be spent on sustainable expenses, receives most support among the tested options. We also demonstrate the robustness of the mental accounting heuristic in two ways: by showing that the preference for environmental earmarking of carbon taxes is observed across all relevant subsections of the population, and that mental accounting also appears to shape preferences for health-related earmarking of tobacco taxes, and social-related earmarking of inheritance taxes.