Digital literacy plays a significant role in aiding farmers' shift towards green production methods and enhancing their income. This study utilizes household surveys to gather data from 1,182 Chinese grain farmers to empirically analyze the impact and mechanism of farmers' digital literacy on the transition toward green food production. The study demonstrates that enhancing farmers' digital literacy positively impacts the green transition of food production. This effect remains consistent even after endogeneity analysis and robustness testing. The mechanism test shows that farmers' digital lit...