The quantitative macroeconomics literature has documented that in the basic Overlapping Generations model a privatization of the social security system, going from a Pay-As-You-Go to a Fully Funded system, generates large long run welfare gains at the cost of substantial welfare losses for initial generations. We propose an alternative to previous literature. In this paper we maximize over the entire policy space, following the optimal fiscal policy approach, rather than comparing alternative policy paths one to one. That is, policies are chosen as part of the optimal design of a social security privatization in a Pareto improving way. The government decides endogenously how to finance the implicit social security liabilities and compensate the initial generations alive during the transition. In contrast with previous analysis the resulting allocation, by construction, lies on the constrained Pareto frontier. We find that the optimal design of reforms exhibits sizeable welfare gains, arising because of the reduction in labor supply distortions. In contrast, the welfare gains coming from the reduction of savings distortions are relatively small.