Abstract: Despite decades of research on mechanism design and on many practical aspects of cost-benefit analysis, one of the most basic and ubiquitous features of regulation as actually implemented throughout the world has received little theoretical attention: exemptions for small firms. These firms may generate a disproportionate share of harm due to their being exempt and because exemption induces additional harmful activity to be channeled their way. This article analyzes optimal regulation with exemptions where firms have different productivities that are unobservable to the regulator, regulated and unregulated output each cause harm although at different levels, and the regulatory regime affects entry as well as the output choices of regulated and unregulated firms. In many settings, optimal schemes involve subtle effects and have counterintuitive features: for example, higher regulatory costs need not favor higher exemptions, and the incentives of firms to drop output to become exempt can be too weak as well as too strong. A final section examines the optimal use of output taxation alongside regulation, which illustrates the contrast with the mechanism design approach that analyzes the optimal use of instruments of a type that are not in widespread use.