There are ways to do this with mods or servers but i want an official single player way to do this.
Minecraft fly command. The player can gain or lose altitude while flying by pressing the jump or sneak keys respectively. To activate flight in creative mode double tap the space bar quickly. Fly is a server admin command to fly like in creative mode. Gamemode 1 or gamemode creative or gamemode c.
In vanilla non modified minecraft the only way to fly is by playing in creative mode. You will no longer receive fall damage when execute fly player noallow and fly player gravity command. For java edition pc mac press the space key twice quickly. A quick tutorial showing in minecraft how to fly in survival mode just in case you re bored of walking on earth then i will show you how to fly in survival m.
For pocket edition pe you tap the jump button twice quickly. Used by type it on chat part. It is unknown when this command was added. The game control to start flying depends on the version of minecraft.
Make a command in java edition to be able to fly in survival mode like console with host privileges or 1 5 for bedrock with ability s p e r a mayfly true with education edition option turned on. To change gamemodes while in game you must first have cheats enabled and then type this command into chat. If it s not for you there s always cheats and console commands.