Using a firm-level panel dataset on private small- and medium-sized enterprises (SMEs) in Viet Nam's manufacturing sector, this paper examines productivity dynamics of formal and informal firms. We decompose productivity changes into changes within and between formal and informal firms. We assess the contributions of firm entry and exit as well as informal-formal transitions. Our results show that productivity is considerably lower and misallocation more prevalent in the informal than in the formal sector. Yet, formalizing firms in Viet Nam make an important contribution to aggregate productivity growth among manufacturing SMEs, growing faster than other firms and increasing efficiency. We identify two 'regimes' of formalization. Until early 2010, more productive (previously) informal firms formalize. Policy changes and accelerated formalization then alter the characteristics of formalizers, as less productive firms become formal. While this formalization wave depresses average formal total factor productivity growth, the overall productivity effect is positive.