Background: Atelectasis are present even before surgery in patients with obesity. No study has reported the prevalence of preoperative atelectasis in obese patients to date. We aimed to estimate the prevalence and extension of preoperative atelectasis in patients with obesity undergoing bariatric surgery, and the extent to which atelectasis mediate preoperative SpO2 values. Methods: Cross-sectional study in a single center specialized in laparoscopic bariatric surgery. Preoperative chest computed topographies were re-assessed by a senior radiologist to quantify the extent of atelectasis coverage as a percentage of total lung volume. Patients were classified as having atelectasis when the affection was greater than or equal to 2.5% to estimate the prevalence of atelectasis. Crude and adjusted prevalence ratios and odds ratios were obtained to assess the relative prevalence of atelectasis and percentage coverage, respectively, at higher obesity categories. Generalized additive models were built to assess the effect of BMI on preoperative SpO2 and the extent to which atelectasis percentage mediated the effect. Results: The sample consisted of 236 patients with a median BMI 40.3 (IQR:34.6-46.0, range:30.0-77.3). The overall prevalence of atelectasis was 32.6% (95%CI: 27.0-38.9) and by BMI category: 30-35 (12.9%, 95%CI:6.1-24.4), 35-40 (28.3%, 95%CI:17.2-42.6), 40-45 (12.3%, 95%CI:5.5-24.3), 45-50 (48.4%, 95%CI:30.6-66.6), and >50 units (68.8%, 95%CI: 86.7-100). Compared to 30-35, only the categories with BMI >45 had significantly higher relative prevalence of atelectasis: 45-50 (aPR: 3.44, 95%CI:1.64-7.23) and >50 (7.6, 95%CI: 3.9-14.5); and odds of greater atelectasis percentage coverage: 45-50 (aOR=6.0, 95%CI:2.12-16.9) and >50 (aOR=104.7, 95%CI:33.6-326.8). In univariable analysis, BMI (p<0.001, %deviance=38.7), obstructive sleep apnea (p<0.001, %deviance=12.4), and atelectasis percent (p<0.001, %deviance=67.0) were related with a decrease in SpO2. In a fully adjusted model (%deviance=68.1), only atelectasis (p<0.001) remained associated with SpO2. Conclusions: The prevalence and extension of atelectasis increased with higher BMI, being significantly higher at BMI >45. Preoperative atelectasis mediated the effect of BMI on SpO2.