This research aims to empirically investigate the relationship between bank digital transformation and lending distance. In traditional financial geography theory, banks have a natural geographical proximity preference in their credit decision-making, which might lead to suboptimal credit allocation. Can the rapid development of digitalization improve the situation that banks are only capable of undertaking ex ante due diligence and ex post monitoring of proximate borrowers, given that fintech has greatly improved the overall efficiency of the financial industry? Using bank loan data of listed enterprises in China from 2013 to 2021, this paper finds that the digital transformation of banks can significantly extend the lending distance between banks and enterprises. The moderating effect analysis suggests that distance extending effect of bank digitalization is more pronounced for firms with poor information quality and in competitive banking sector. Further, digital transformation extends the lending distance without increasing risk preferences, as evidenced by the empirical finding that the non-performing loan ratio remains unaffected by the increased distance. Also, geographical expansion in lending distance reduces loan concentration. The research in this paper supports the conclusion that banks' digital transformation positively impacts corporate credit allocation and is beneficial to achieving financial stability by improving loan performances.