PurposeDigital transformation (DT) is a high-risk, long-term and systematic organizational change, which is highly dependent on the level of operation management. According to the resource-based view and innovation theory, this paper aims to examine the impact of DT on firm performance.Design/methodology/approachThis paper empirically tests the impact of DT on firm performance by selecting total factor productivity and innovation outputs as mediating variables from the perspective of process and outcomes, respectively. It uses Shanghai and Shenzhen A-share-listed companies from 2010–2021 as research samples, searching the frequency of keywords about DT in their annual reports.FindingsThe findings reveal the following. First, DT can significantly improve the performance of firms. Second, total factor productivity and innovation outputs play a mediating role between DT and firm performance. Third, the impact of DT on SMEs is more obvious than in bigger ones. However, the effect of DT on performance is more significant in SOEs than non-SOEs. Furthermore, DT positively effects labor-intensive and technology-intensive firms, but negatively effects capital-intensive firms.Originality/valueThis paper first proposes the mechanism analysis from the view of process and outcomes, by using total factor productivity and innovation outputs, which adds depth to the research on the impact of DT on firm performance. Moreover, the authors empirically examine the heterogeneity of the impact of DT on different firm sizes, firm properties and intensity of production factors.