How to turn off Hardcore mode in an existing world

Minecraft has no button to leave Hardcore. Here is the one tag to change in level.dat, and how to get your player out of Spectator mode after a death.

A Hardcore world locks the difficulty to Hard and gives you one life. When you die, the death screen only offers to spectate the world. There is no setting to turn it off later, even with cheats, because Hardcore is stored as a flag in the world's level.dat. Changing that flag is all it takes.

Quickest way: close the game, open the world's level.dat in the editor, go to the Visual tab and switch off Hardcore mode under Fix this world, then save. It works whatever version saved the world. The rest of this guide shows where the flag is, and how to get a dead player out of Spectator.

Where the Hardcore flag is

The flag is a Byte: 1 means Hardcore, 0 means a normal world. Its place depends on the version that last saved the world.

  • Java 1.21.11 and older: Data › Bhardcore
  • Java 26.1 and later: Data › difficulty_settings › Bhardcore, next to Strdifficulty and Blocked
26.x level.dat with Hardcore turned off
  • { }Data
    • { }difficulty_settings
      • Strdifficulty"hard"
      • Bhardcore0
      • Blocked0

Turn it off

  1. Close Minecraft. Copy the world folder as a backup.
  2. Open the world's level.dat in the editor.
  3. Expand Data (and difficulty_settings on 26.x) and set hardcore to 0.
  4. Optional: set the difficulty to what you want, and the lock to 0 so you can change it later from the options screen.
  5. Download, replace level.dat in the world folder, and start the game.

The heart icons lose their Hardcore look and the world list no longer shows the world as Hardcore. If you were alive, you are done.

If your player already died

After a Hardcore death you respawn in Spectator mode, and that mode is saved in your player data, not in level.dat. Turning Hardcore off does not change it. Set your player's IplayerGameType back to 0 (Survival).

VersionWhere your singleplayer data is
1.21.11 and olderInside the same level.dat: Data › Player › playerGameType
26.1 and laterplayers/data/<uuid>.dat in the world folder, where the UUID matches singleplayer_uuid in level.dat

On 26.x the player file is named with your UUID in its usual text form, while level.dat stores it as four numbers. The converter in the player data guide turns one into the other.

Shortcut if you only need the game mode

If you set allowCommands to 1 in the same file, you can then type /gamemode survival in the game instead of editing player data. That leaves cheats on for the world; see enabling cheats.

Servers

On a dedicated server, the hardcore line in server.properties decides whether the world is Hardcore. Set it to false, then fix the level.dat flag and the game mode of each player who died. Their files are in world/playerdata before 26.1 and in world/players/data from 26.1. Stop the server before editing anything.

Turning Hardcore on

The same flag works the other way: set it to 1 to make a normal world Hardcore. Set the difficulty to Hard at the same time, since a Hardcore world is meant to be played on Hard.

Ready to edit?Open the file in the editor: every value keeps its NBT type and the file is saved in its original format.