We characterize the welfare effects of the informal sector by proposing a decomposition into efficiency and redistribution components. We focus on an economy where a planner wants to redistribute income with taxation and sets the optimal tax scheme. Since the informal sector can limit the taxation possibilities for the government but at the same time provide a shelter against tax distortions for individuals we show that the net welfare effect can be positive or negative. We show that the relative advantage between informal and formal employment across different income levels is the key dimension that shapes the welfare costs of the informal sector. Using the model estimated with Colombian microdata, we show that, conditional on the optimal tax policy, the Colombian shadow economy benefits efficiency at the expense of redistribution. Consequently, the presence of the informal sector reduces welfare only when preferences for redistribution are strong.