Childhood obesity can affect life in three aspects, including continuing obesity after childhood, increased risk of chronic diseases, and mortality. Over the last year, students' lifestyles have changed due to the COVID-19 pandemic. In order to plan educational interventions to improve students' health, this study aimed to investigate the prevalence of obesity among elementary students during COVID-19 pandemic in Yazd, Iran. Methods: This cross-sectional study was conducted on 583 elementary students in 4th-6th grades (aged 10-12 years) in Yazd in 2021. The participants were recruited using multistage sampling (cluster, stratified, and random) method. Data collection tools included the physical activity questionnaire for older children (PAQ-C) and a validated researcher-made questionnaire in terms of fast food and carbonated sweet beverages consumption. Body mass index (BMI) was calculated using the students’ height and weight information registered in student electronic registration system (SANAD). Results: The prevalence of overweight and obesity among primary school students was 23.9% and 14.5%, respectively. Gender (P < 0.0001), type of school (P < 0.0001), mother’s education level (P = 0.03), amount of carbonated sweet beverages (P < 0.0001), and level of physical activity (P = 0.04) were associated with BMI status. There was no significant association between frequency of students’ consumption of fast food (P = 0.41) or soft drinks and BMI status (P = 0.48). Conclusion: During the COVID-19 outbreak, students’ weight gain has been more affected by reducing physical activity than consuming high-calorie foods. Therefore, it is required to create new infrastructure and opportunities for improving physical activity among students.