Minecraft Java Save Editor β€” Edit Inventory, XP, Position & Game Rules

Last verified: 2026-10-01

Save file to edit
%APPDATA%\.minecraft\saves\<World Name>\level.dat

Minecraft: Java Edition saves are NOT plain text β€” they are gzip-compressed NBT, so a text editor shows only garbled bytes. Each world lives in %APPDATA%\.minecraft\saves\<World Name>\. The three files you edit are: level.dat (world-wide NBT: game rules, world spawn, time/weather, difficulty, and in a single-player world the embedded Player tag with your inventory, XP, health and position); playerdata\<UUID>.dat (the same per-player data, used by LAN/multiplayer worlds); and region\r.X.Z.mca (the chunk/block data in Anvil format). To edit: fully quit Minecraft AND the launcher first (so nothing rewrites the file when you save), back up the whole world folder, then open level.dat in an NBT editor β€” NBTExplorer (classic) or its maintained fork NBT Studio for raw tags, Universal Minecraft Editor for an inventory/player GUI, or MCA Selector for chunks. Change the tag, save, relaunch. Safest of all is the in-game /data command, which edits live NBT with validation and no external tool. Editing inventory counts, XP or game rules is low-risk; a malformed item tag or a wrong Data Version is what crashes a world on load.

How to edit a Minecraft: Java Edition world on PC. The world folder holds level.dat (gzip NBT) plus playerdata/<UUID>.dat and region/*.mca. Which NBT editors decode it (NBTExplorer, NBT Studio, Universal Minecraft Editor, MCA Selector), which tags are safe to change (inventory, XpLevel, Pos, game rules), and how to avoid a crash-on-load or corrupt chunk.

What you can edit and which tag to change

What it changesXML tagExample valueNotes
Inventory items Player β†’ Inventory (Slot, id, Count, tag) {Slot:0b, id:"minecraft:diamond", Count:64b} Since 1.13 item ids are namespaced strings (minecraft:diamond), not numeric ids. Count is a byte (max 64 for stackables; editors let you push past). A typo'd id or a tag block on an item that doesn't support it can crash the world β€” copy a known-good item's structure.
Experience level Player β†’ XpLevel / XpP / XpTotal XpLevel = 30 XpLevel is the green number; XpP is the 0.0–1.0 progress bar within the level; XpTotal is lifetime XP. Set XpLevel and leave XpP at 0.0 for a clean result.
Position & dimension Player β†’ Pos / Dimension Pos = [0.0d, 80.0d, 0.0d] Three doubles: X, Y, Z. Use this to unstuck a player trapped in blocks or fallen out of the world. Dimension is a string (minecraft:overworld / the_nether / the_end).
Health & hunger Player β†’ Health / foodLevel Health = 20.0f Health is a float, 20.0 = full ten hearts. foodLevel is 0–20. Handy after a save where you logged out dying.
Creative/flight abilities Player β†’ abilities (mayfly, flying, instabuild, invulnerable) mayfly = 1b Bytes used as booleans (1/0). These are normally driven by game mode; force them only if you understand they can desync from playerGameType.
Game mode Player → playerGameType / Data → GameType playerGameType = 1 (Creative) 0 Survival, 1 Creative, 2 Adventure, 3 Spectator. The world-level Data→GameType in level.dat sets the default; the per-player value overrides it.
Game rules Data β†’ GameRules (keepInventory, doDaylightCycle, mobGriefing…) keepInventory = "true" Stored as STRING tags ("true"/"false"), not bytes β€” a common mistake that makes the rule silently ignored. Easier and safer to set with /gamerule in-game.
World spawn & time Data β†’ SpawnX/SpawnY/SpawnZ, DayTime DayTime = 1000 (morning) DayTime is ticks (0=dawn, 6000=noon, 13000=dusk). SpawnX/Y/Z set the world spawn point for new players and respawn without a bed.

How to edit your Minecraft: Java Edition save by hand

  1. Fully quit Minecraft and close the launcher β€” the game writes the world on exit and will overwrite your edit otherwise.
  2. Open %APPDATA%\.minecraft\saves\ and copy the whole <World Name> folder somewhere safe as a backup.
  3. Open level.dat in NBTExplorer / NBT Studio (raw tags) or Universal Minecraft Editor (inventory/player GUI). For a multiplayer world edit playerdata\<UUID>.dat instead of the embedded Player tag.
  4. Find the tag (expand Data, then Player for single-player), change the value, and keep the tag TYPE identical (byte vs string vs double) β€” the file saves as gzip NBT automatically.
  5. Save, relaunch Minecraft, load the world. If it crashes on load, restore the backup and re-edit a single tag at a time to isolate the bad value.

Prefer a save editor instead of raw XML?

These edits are for your own local/single-player worlds. On a server or realm the authoritative data lives server-side, so client-side file edits do nothing and anti-cheat/plugins can kick or roll back a player whose NBT doesn't match server state.

Mistakes that corrupt the save

Not sure where the file is? See the full Minecraft: Java Edition save file location guide (every platform path), or the corrupted-save recovery guide if an edit broke your file.

FAQ

Can I edit a Minecraft Java save without a tool?

Yes β€” the in-game /data command (e.g. /data merge entity @s {XpLevel:30}) edits player and block-entity NBT live with validation, no external editor needed. You need cheats enabled on the world or operator rights.

Why does my world crash after editing level.dat?

Almost always a wrong tag type (byte where a string belongs, or vice-versa), a bad namespaced item id, or a DataVersion mismatch. Restore your backup and change one tag at a time.

Where is the player data in a single-player world?

Inside level.dat under the Player tag. Multiplayer/LAN worlds instead keep each player in playerdata\<UUID>.dat; the single-player Player tag is then unused.

Which editor is best for inventory?

Universal Minecraft Editor gives a visual inventory/player panel; NBTExplorer or NBT Studio expose every raw tag for precise edits. MCA Selector is for chunk/block region files, not player inventory.

Other games

Need another game or a quick backup? Use the Save Location Finder β€” pick any game to get its exact save path plus a ready-to-run backup command.