Patients with obesity are at increased risk of postoperative pulmonary complications. CPAP has been used successfully to prevent and treat acute respiratory failure, but in many clinical scenarios, high-flow nasal cannula (HFNC) therapy is emerging as a possible alternative. We aimed to compare HFNC and CPAP in a sequential study measuring their effects on gas exchange, lung volumes, and gas distribution within the lungs measured through electrical impedance tomography (EIT). We enrolled 15 subjects undergoing laparoscopic bariatric surgery. Postoperatively they underwent the following oxygen therapy protocol (10 min/step): baseline air-entrainment mask, HFNC at increasing (40, 60, 80, and 100 L/min) and decreasing flows (80, 60, and 40 L/min), washout air-entrainment mask and CPAP (10 cm H2O). Primary outcome was the change in end-expiratory lung impedance (ΔEELI) measured by EIT data processing. Secondary outcomes were changes of global inhomogeneity (GI) index and tidal impedance variation (TIV) measured by EIT, arterial oxygenation, carbon dioxide content, pH, respiratory frequency, and subject's comfort. Thirteen subjects completed the study. Compared to baseline, ΔEELI was higher during 10 cm H2O CPAP (P = .001) and HFNC 100 L/min (P = .02), as well as during decreasing flows HFNC 80, 60, and 40 L/min (P = .008, .004, and .02, respectively). GI index was lower during HFNC 100 compared to HFNC 60increasing (P = .044), HFNC 60decreasing (P = .02) HFNC 40decreasing (P = .01), and during 10 cm H2O CPAP compared to washout period (P = .01) and HFNC 40decreasing (P = .03). TIV was higher during 10 cm H2O CPAP compared to baseline (P = .008). Compared to baseline, breathing frequency was lower at HFNC 60increasing, HFNC 100, and HFNC 80decreasing (P = .01, .02, and .03, respectively). No differences were detected regarding arterial oxygenation, carbon dioxide content, pH, and subject's comfort. HFNC at a flow of 100 L/min induced postoperative pulmonary recruitment in bariatric subjects, with no significant differences compared to 10 cm H2O CPAP in terms of lung recruitment and ventilation distribution.