This paper introduces an innovative Urban Economic Resilience Index and uses data from 276 cities in the period from 2011 to 2021 to investigate the impact of digital finance on economic resilience. The empirical results reveal that digital finance significantly improves economic resilience and has a pronounced effect on various dimensions of resilience such as resistance and resilience ability, adaption and adjustment ability, and innovation and transformation ability. Furthermore, these findings demonstrate the robustness including the incorporation of a diverse sample of municipalities, alternative measures for digital finance and economic resilience, the inclusion of supplementary control variables, and the application of the instrumental variable methodology. Furthermore, digital finance improves economic resilience by injecting vitality into innovation and entrepreneurship, accelerating industrial structure upgrading and enhancing financial efficiency. Analyses also show that compared to eastern regions and regions with high levels of network coverage as well as economic development, digital finance is more likely to improve economic resilience. Overall, this study provides new insights into digital finance and economic resilience.