Minecraft NBT and save file guides
Practical guides to Minecraft's save files: level.dat, player data, game rules, servers.dat, structures and Bedrock, checked against current Java and Bedrock versions.
Each guide explains one job from start to finish: which file to open, which tags to change, and what to check afterwards. They are written for current versions, Java 26.x and Bedrock, and point out where older worlds differ, because Java 1.21.11 and 26.1 changed where many settings are stored.
New to NBT? Start with the NBT format explained, then the mistakes to avoid.
World settings
- How to edit level.dat in Minecraft Java Editionlevel.datGame mode, hardcore, cheats, difficulty and spawn, with the 26.1 layout changes.
- How to turn off Hardcore mode in an existing worldlevel.datSwitch a Hardcore world to normal survival and bring a dead player back.
- How to enable cheats in Minecraft after creating the worldlevel.datThe temporary LAN trick, and the permanent allowCommands flag.
- Change Minecraft game rules without commandslevel.dat or game_rules.datkeep_inventory and friends, in the three formats Java has used.
- Fix a corrupted level.dat and restore level.dat_oldlevel.dat_oldCheck the file, restore the automatic backup, or rebuild it.
- Disable a datapack that stops your Minecraft world from loadinglevel.datTurn off the datapack that breaks a world, from level.dat.
- Java 26.1 world format changes: what moved wherethe whole world folderEvery moved folder and renamed tag, in two tables.
Players and inventories
- Edit Minecraft player data: inventory, XP, health and positionplayers/data/<uuid>.datFind the right file, then change items, XP, health or game mode.
- Move a stuck player: change position or dimension offlineplayers/data/<uuid>.datEscape crash loops, lava and broken chunks by editing Pos and Dimension.
- Switch a Minecraft server between online and offline mode without losing inventoriesplayerdata/<uuid>.datWhy players lose everything when online-mode changes, and how to migrate their files.
- Lost your inventory after changing online-mode? Get it backplayerdata/<uuid>.datThe old inventory is still in a file with the previous UUID. Put it back.
- Transfer Minecraft player data to another accountplayerdata/<uuid>.datMove or copy inventory, XP and progress to another name or UUID.
- See your Minecraft server's player stats: play time, deaths and morestats/<uuid>.jsonRank every player by play time, deaths, kills or blocks mined.
- How to find a Minecraft player's online UUIDusercache.jsonFrom a name to its UUID with Mojang's page, usercache.json or the game.
Files and formats
- The NBT format explained: tags, compression and byte orderany .dat or .nbtThe 13 tag types, their limits, compression, and Java versus Bedrock.
- SNBT: writing Minecraft NBT as textcommands and .snbtType suffixes, arrays and quoting, with the 1.21.5 additions.
- Where Minecraft saves worlds and .dat filessaves/<world>/Java and Bedrock world folders on every system, and what each file holds.
- Edit your Minecraft server list (servers.dat).minecraft/servers.datRestore, reorder, rename or move your multiplayer list.
- Edit structure block .nbt filesgenerated/<namespace>/structure/*.nbtSwap materials, fix blocks and remove entities in saved structures.
- NBT editing mistakes that break Minecraft savesany .dat or .nbtThe handful of mistakes behind most broken saves, and how to avoid them.
- See every map of your Minecraft world and save them as PNGdata/map_<n>.datAll map_*.dat files of a world on one zoomable view, exported as PNG.
- Copy a Minecraft world to or from a server without breaking itworld/scp, rsync or SFTP, and the traps that break a copied world.
- Edit your Minecraft server's files from the browser (SFTP drive)server folder over SFTPMount the server over SFTP and save files straight back to it.