Previous research argues that law expresses social values and could, therefore, influence individual behavior independently of enforcement and penalization. Using three laboratory experiments on tax avoidance and evasion, we study how legality affects individuals’ decisions. We find that, without any risk of negative financial consequences, the qualification of tax minimization as illegal versus legal reduces tax minimization considerably. Legislators can thus, in principle, affect subjects’ decisions by defining the borderline between legality and illegality. However, once we introduce potential negative financial consequences, legality does not affect tax minimization. Only if we use moral priming to increase subjects’ moral cost do we again find a legality effect on tax minimization. Overall, this demonstrates the limitations of the expressive function of law. Legality appears to be an important determinant of behavior only if we consider activities with no or low risk of negative financial consequences or if subjects are morally primed.