Diabetic retinopathy (DR), a microvascular complication of type 2 diabetes mellitus (T2DM), is a leading cause of blindness and has detrimental effects on patients' quality of life. We compared the risk of DR diagnosis with sodium-glucose cotransporter-2 inhibitors (SGLT2i) versus dipeptidyl peptidase-4 inhibitors (DPP-4i) in patients with T2DM in Japan. This Japanese retrospective cohort study used the JMDC Claims Database (data collected from January 2015 to September 2022). Patients with T2DM and no record of microvascular or macrovascular diseases who were newly treated with an SGLT2i (23,061 patients) or a DPP-4i (53,986 patients) were matched 1:1 using propensity score (10,166 per matched group). Incidence rates (IRs) and cumulative IRs of DR diagnosis were calculated for each treatment group; hazard ratio (HR) and its 95% confidence interval (CI) were calculated using Cox proportional hazard models to compare the risk between the groups. The IR of DR diagnosis was 46.23 and 57.12 per 1000 person-years in the SGLT2i and DPP-4i groups, respectively, with a significantly lower risk in the SGLT2i group than in the DPP-4i group (HR 0.83, 95% CI 0.75-0.92, P = 0.0003). In this study, the risk of DR diagnosis was lower with SGLT2i compared with DPP-4i in patients with T2DM without microvascular and macrovascular diseases in Japan. Findings suggest that early SGLT2i treatment may be beneficial in preventing DR development in early-stage T2DM. Graphical abstract available for this article.