When a firm can recognize its previous customers, it may use information about their past purchases to price discriminate. We study a model with a monopolist and a continuum of heterogeneous consumers, where consumers have the ability to maintain their anonymity and avoid being identified as past customers, possibly at a cost. When consumers can freely maintain their anonymity, they all individually choose to do so, which results in the highest profit for the monopolist. Increasing the cost of anonymity can benefit consumers but only up to a point, after which the effect is reversed. We show that if the monopolist or an independent third party controls the cost of anonymity, it often works to the detriment of consumers.