Can public shaming increase tax compliance through social pressure? Many tax authorities make ample use of public shaming. However, empirical evidence from outside the laboratory on how a new shaming law affects overall compliance is lacking. We provide the first evidence from the field, exploiting comprehensive administrative tax data and the introduction of a novel naming-and-shaming policy in Slovenia in 2012. The policy aims to reduce outstanding tax debt among the selfemployed and corporations. Our empirical strategy exploits the variation across taxpayers in exante exposure to the shaming policy. We find that taxpayers reduce their tax debt by 8.5% to avoid shaming, particularly in industries where reputational concerns are likely to be important. The publication of the first naming-and-shaming list further reduces tax debt among shamed taxpayers because of social learning. This effect, however, is marginal in terms of revenue and tapers off quickly.