A world can disappear from the singleplayer list, show up without its name, or fail with an error when you open it. The terrain is usually fine: chunks live in region files, separate from level.dat. What broke is the small file that tells the game how to load everything else. A crash or power cut while saving, a full disk, or a sync tool locking the file can all leave it half-written.
First, copy the world folder
Before trying anything, copy the entire world folder somewhere else. Every step below replaces files, and you want to be able to start over.
Check whether level.dat is really damaged
Drop level.dat onto the editor.
- It opens and you see a
Datacompound with sensible values: the file is readable. The problem is elsewhere, often a mod or data pack the world needs. Read the game's log for the real error. - It opens but looks wrong, for example an empty
Dataor missingLevelNameandVersion: the file was written incompletely. - The editor can't read it, or the file is 0 bytes: it is damaged.
In the last two cases, move on to the backup.
Restore level.dat_old
Each time Minecraft saves level.dat, it keeps the previous version next to it as level.dat_old. That copy is usually only minutes older.
- Close Minecraft.
- Rename
level.dattolevel.dat_broken. Keep it; you may need it later. - Copy
level.dat_oldand rename the copy tolevel.dat. - Open the new level.dat in the editor to check it reads correctly and has a
Datacompound. - Start Minecraft and open the world.
On Windows, turn on file name extensions (File Explorer, View, File name extensions) so you can see the real names. Otherwise you may end up with level.dat.dat.
If both files are damaged
You can borrow a level.dat from a new world and adjust it.
- In the same Minecraft version, create a new world with the same seed, if you know it, and the same game mode. Quit it straight away.
- Copy the new world's
level.datinto the damaged world's folder. - Open it in the editor and set
LevelName,GameType,allowCommandsand the difficulty to match the old world. The spawn point can be moved too. - Open the world and check it.
What you can lose, and what you keep
The answer depends on the version, because Java 26.1 split level.dat into several files.
| Data | 1.21.11 and older | 26.1 and later |
|---|---|---|
| Singleplayer inventory and position | In level.dat: lost with it | Safe in players/data |
| Game rules | In level.dat: reset to defaults | Safe in data/minecraft/game_rules.dat |
| Seed | In level.dat: taken from the new world | Safe in data/minecraft/world_gen_settings.dat |
| Terrain, builds, chests | Safe: stored in region files | |
With an older world and an unknown seed, new chunks will generate with a different seed than the old ones. Explored areas stay as they were, but expect sharp borders where new terrain meets old.
Other damaged files
The same rescue works for player files: <uuid>.dat_old sits next to each <uuid>.dat. For files in data, such as maps or the scoreboard, deleting a broken file makes the game start that data from scratch, which is often acceptable.
Avoiding it next time
- Quit worlds with Save and Quit to Title, and wait for the world list before closing the game.
- Keep worlds out of folders that cloud sync tools lock while uploading, or pause syncing while you play.
- Back up regularly. A copy of the whole world folder is all it takes.