How to Have God Mode in "Minecraft"by Seth Amery ; Updated September 22, 2017
"Minecraft" features multiple modes of gameplay, including Creative Mode. Creative Mode is the only native way to have a God Mode naturally in-game; in this mode, you're free to place and remove blocks, fly, and even sit in a falling flood of lava. However, lowering the difficulty is as close as you can get in other modes without using mods.
In the main game, you can enter "/gamemode creative" in the chat window to swap to Creative Mode. Here it's impossible to die; you can change the world at your whim and hold the spacebar to fly in the air. If you don't want to create, lower your difficulty to "Peaceful." Hostile monsters never spawn, and you'll regain health if you take damage, but you're still susceptible to fatal environmental dangers.
The only way to be truly invincible in any other "Minecraft" mode requires modding the game. Official mods are on Curse, and you can also explore other sites like PlanetMinecraft, MinecraftMods and the official forums.