Refractive errors, particularly myopia, constitute a significant global public health concern, contributing to morbidity and disability. A more comprehensive understanding of the determinants of refractive errors and the differences between urban and rural areas is essential to develop effective preventive measures for youth. This study aimed to compare the prevalence and risk factors of refractive errors among youth in urban and rural Tianjin, China. This school-based cross-sectional study was conducted in 2022. Elementary, middle, and high school students aged 6-18 years from both urban and rural areas of Tianjin were included. All participants underwent visual acuity testing and refractive measurement and completed comprehensive questionnaires. A total of 346,146 participants (176,628 boys) were included in this investigation (50.36% for urban and 49.64% for rural, respectively). Myopia, hyperopia, astigmatism, and anisometropia were present in 56.8, 9.7, 56.64, and 21.3% of urban students, respectively. Similarly, rural students had a prevalence of 57.6, 11.5, 56.48, and 22.0% for the respective conditions. Compared to rural students, after adjusting for age, sex, and other significant variables, urban students were 1.05 times more likely to have myopia (95% CI: 1.03-1.07, p < 0.0001), 0.71 times less likely to have hyperopia (95% CI: 0.69-0.73, p < 0.0001), and 1.02 times more likely to have astigmatism (95% CI: 0.69-0.73, p < 0.0001). There was no significant association between anisometropia and residence (OR: 1.00, 95% CI: 0.98-1.02, p = 0.9850). Sociodemographic and physiological factors contribute to the disparities in the prevalence of refractive errors between urban and rural areas. Age, increased near-work activities, and Decreased outdoor time were identified as risk factors for myopia, astigmatism, and anisometropia. Conversely, the absence of a parental history of refractive errors emerged as a protective factor for myopia and astigmatism among students. Lower parental education levels were negatively correlated with the risk of myopia and anisometropia in their children. Specifically, the lower the parental education, the greater the risk of myopia in their offspring. For urban students only, lower parental education was associated with an increased risk of astigmatism. Crude prevalence estimates May not accurately reflect the true burden of refractive error due to confounding factors such as age and sex. Accounting for these factors revealed that urban students were more likely to have myopia and astigmatism but less likely to have hyperopia compared to their rural counterparts. These disparities highlight the importance of considering geographical variations when implementing strategies for myopia control and prevention.