Updated:
1. Breathe underwater
/effect give @s minecraft:water_breathing 600 0 true
Ten minutes of air. On Bedrock: /effect @s water_breathing 600 0 true. Java also accepts infinite.
2. See clearly
/effect give @s minecraft:conduit_power 600 0 true
/effect give @s minecraft:night_vision 600 0 true
Conduit Power gives air, underwater vision and faster mining. Add Night Vision for the deep ocean floor.
3. Swim faster
/effect give @s minecraft:dolphins_grace 600 0 true
4. Underwater gear (Java 1.21.5+)
/give @s minecraft:netherite_helmet[enchantments={respiration:3,aqua_affinity:1}] 1
/give @s minecraft:netherite_boots[enchantments={depth_strider:3}] 1
Respiration extends air, Aqua Affinity removes the underwater mining penalty and Depth Strider speeds up walking in water. For older syntax see the strongest armor command. On Bedrock, give the item and use /enchant while holding it.
5. Everything for everyone (Java)
/effect give @a minecraft:conduit_power infinite 0 true
/effect give @a minecraft:night_vision infinite 0 true
/effect give @a minecraft:dolphins_grace infinite 0 true
Remove them with /effect clear @a.
6. Make an air pocket
/fill ~-4 ~-4 ~-4 ~4 ~4 ~4 minecraft:glass hollow
hollow makes only the outer shell glass and fills the inside with air. Run it underwater for a 9x9x9 room you can breathe in, centered on you. To just clear water, see remove water.
7. Turn off drowning
/gamerule drowning_damage false
Nobody takes drowning damage and no effects are needed. Use drowningDamage on Java 1.21.10 and earlier and drowningdamage on Bedrock. The air bar still drops but empty air does no harm.
Troubleshooting
- Air still drops: the effect may have expired.
- Still dark: add Night Vision.
- No enchantments: match the syntax to your Java version.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.