In this paper we build a model of occupational choice with informal production and progressive income taxation. We calibrate the model to the Brazilian economy to evaluate the impact of removing financial frictions on informality. We find that financial deepening leads to a drop in the size of the informal sector (from 37 percent to 22 percent of official GDP), to an increase in measured TFP (by 4 percent), to an increase in official GDP (by 27 percent), to a decrease in tax evasion (by 17 percent) and to an increase in fiscal revenues (by 15 percent). When assessing the response of this policy at different levels of financial development, we find a non-linear relationship between the credit-to-GDP ratio on the one hand, and either the size of the informal economy, or GDP per capita on the other hand. We test these features with cross-country data and find evidence in favor of both types of non-linearity. We also investigate changes in the income tax progressitivity as an alternative policy and find it to be more effective in countries with a medium to high level of financial markets development.