Editing Minecraft Player Data: UUIDs, NBT Files and Safe Inventory Fixes
Fix one player's broken inventory: where player data lives before and after 26.1, matching a name to a UUID, and editing a .dat file without corrupting it.
One player has a stack of 64 netherite blocks that a dupe bug handed them, or a corrupted inventory that crashes their client every time they log in, or thirty levels that vanished in a server rollback. You do not want to reset the world; you want to change one file. This guide covers where that file is, how to work out which one belongs to which player, and how to edit it without breaking the save.
Rolling back a griefed build is a different job, covered in Minecraft Grief Protection and Rollback. This page is about the player, not the world.
Try It Without Touching a File First
Most inventory fixes do not need file editing at all, and the in-game route is faster and far safer. Run these from the panel Console or in-game as an operator, with the player online:
| Command | What it does |
|---|---|
/clear <player> |
Empty their inventory entirely, or /clear <player> <item> for one item type |
/clear <player> <item> <count> |
Remove a specific number of a specific item |
/item replace entity <player> <slot> with <item> [<count>] |
Put an exact item into an exact slot |
/item replace entity <player> <slot> from entity <other> <slot> |
Copy an item from one slot or player to another |
/xp set <player> <n> levels |
Reset or set experience |
/gamemode, /effect clear, /attribute |
The rest of the per-player state |
Slot names are the readable ones: hotbar.0 to hotbar.8, inventory.0 upwards, weapon.mainhand, weapon.offhand, armor.head, armor.chest, armor.legs, armor.feet, enderchest.0 upwards. The full command reference is in Minecraft Server Commands.
/datacan read a player and cannot write one
/data get entity <player> <path>works and is the best way to inspect what is actually in someone's NBT. But/data merge,/data modifyand/data removefail on a player — the wiki lists "tries to edit a player's data" as an explicit failure condition, and player NBT cannot be removed at all. That restriction is the entire reason this article exists. If/itemand/clearcannot express the change you need, the file is your only option.
Two more things worth knowing before you reach for a file. The player must be online for any entity-targeted command to resolve. And a permissions plugin such as LuckPerms will happily give a trusted moderator /clear without handing over the whole console.
Where Player Data Lives
This changed recently, and almost nothing written before 2026 has caught up.
| Data | 26.1 and later | 1.21.11 and earlier |
|---|---|---|
| Player inventory, position, XP | world/players/data/<uuid>.dat |
world/playerdata/<uuid>.dat |
| Advancements | world/players/advancements/<uuid>.json |
world/advancements/<uuid>.json |
| Statistics | world/players/stats/<uuid>.json |
world/stats/<uuid>.json |
Minecraft 26.1 restructured the whole world save, and the player storage move was part of it: playerdata became players/data, advancements became players/advancements, and stats became players/stats. The rest of that restructure — dimensions, region files, namespaced data — is covered in Minecraft World Management.
You will also see <uuid>.dat_old next to each file. That is the previous save, kept automatically as a rollback, and it is often the fastest fix on this entire page: if the current file is broken, the one beside it is one save cycle older and probably fine.
Look before you follow any instruction that names a folder
Which layout you have depends on the Minecraft version your server runs right now. Open the File Manager, open your world folder, and check whether you see
players/orplayerdata/before doing anything else.
Three more files sit in the server root, not the world, and are not player data even though they are keyed the same way: ops.json, whitelist.json and banned-players.json. Those are covered in Minecraft Whitelist and Ban Management and Minecraft Op Permission Levels.
Working Out Which File Is Whose
Player files are named by UUID, not by username — that has been true since 1.7.6. Getting the right UUID is where most of the difficulty on this page actually lives, because a player can have two.
Online-mode UUID. Issued by Mojang when the account was created, permanent, unaffected by name changes. Look it up from the username:
https://api.mojang.com/users/profiles/minecraft/<username> That returns the account's current name and its UUID as 32 unhyphenated hex characters. Insert hyphens in the 8-4-4-4-12 pattern to get the filename.
Offline-mode UUID. If the server runs online-mode=false, the player is never authenticated and Mojang's UUID is never involved. The server derives one instead: a version 3 UUID generated from the MD5 hash of the string OfflinePlayer:<username>. It is deterministic — the same username always produces the same UUID — and it has nothing to do with the real account.
The two are genuinely different for the same person:
| Username | Online-mode UUID | Offline-mode UUID |
|---|---|---|
Notch |
069a79f4-44e9-4726-a5be-fca90e38aaf5 |
b50ad385-829d-3141-a216-7e7d7539ba7f |
jeb_ |
853c80ef-3c37-49fd-aa49-938b674adae6 |
a762f560-4fce-3236-812a-b80efff0b62b |
You can tell them apart at a glance
The first character of the third group is the UUID version. Online-mode UUIDs from Mojang are version 4 (
…-4726-…). Offline UUIDs are version 3 (…-3141-…). A folder full of files whose third group starts with3is an offline-mode server, whatever the panel says.
The quickest local check is usercache.json in the server root, which maps names to UUIDs for everyone the server has seen recently. It is a cache, so it can be stale and it can be missing someone who has not joined in a while — use it as a shortcut, not as the authority.
This is also why a server that switches between online and offline mode appears to reset everyone's inventory: the UUID changes, so the server looks for a file that does not exist and creates a new empty player. The old file is still there under the old UUID. Behind a Velocity proxy the same thing happens if forwarding is misconfigured — see Minecraft Server Networks.
Editing the File Safely
Player data files are GZip-compressed NBT. They are not text, and a text editor will destroy them.
The procedure, in order, with no steps skipped:
- Take a backup from the Backups tab — see How to create a backup. This snapshots the whole server, not just the file you are about to break.
- Stop the server from the Console tab and wait for the process to exit. The server holds the world open and writes player data on its own save cycle; editing underneath a running server means your change is overwritten at best and the file is corrupted at worst.
- Download the file over SFTP or from the File Manager. Keep an untouched copy locally as well.
- Edit it with an NBT tool (below).
- Upload it back to the same path, replacing the original.
- Start the server and have the player log in while you watch the console.
Never edit a player file while the server is running
Even a stopped, disconnected player is held in memory in some circumstances, and the save cycle writes the server's version over yours without warning. "It did not save" is almost always this.
The tools
Amulet (amuletmc.com) is the actively maintained option — release 0.10.62 shipped on 11 August 2026 — and is primarily a world editor that also reads NBT.
NBTExplorer and NBT Studio are the two tools every older guide names. Both still open a player file, because the NBT container format itself has not changed. Both are also effectively unmaintained: NBTExplorer's last release was 2017 and its last commit 2023; NBT Studio's last release was 2022. They will show you the tree correctly; they know nothing about what the tags mean on a modern version.
MCA Selector (github.com/Querz/mcaselector, version 2.8, June 2026, updated for 26.2) is for region files and chunks — not player data. It is the right tool for deleting a corrupted chunk, which is a different fix for a different problem; Minecraft World Management covers that.
The vanilla data generator is the no-third-party-software route, and it is worth knowing about. Minecraft's own server jar has converted between GZip NBT and SNBT — the readable, command-style text form — since 1.13. On your own machine, with a server jar for your version:
# NBT -> readable text
java -DbundlerMainClass=net.minecraft.data.Main -jar server.jar --dev --input in --output out
# text -> NBT
java -DbundlerMainClass=net.minecraft.data.Main -jar server.jar --server --input in --output out Rename the .dat to .nbt for the trip out, edit the resulting .snbt as plain text, and convert back. The one gotcha is a long-standing Mojang bug: running either converter twice into the same output folder deletes its own results, so use a clean output folder each time.
What is inside
The tags you will actually be looking for: Inventory and EnderItems (lists of items, each with a Slot), Pos and Dimension, XpLevel, XpTotal, Health, foodLevel, playerGameType and previousPlayerGameType, abilities, recipeBook, LastDeathLocation, and SpawnX/SpawnY/SpawnZ for a bed or anchor respawn point.
Two version notes. Item contents have used the data component format since 1.20.5, so an item copied out of a 1.20.4 file will not mean the same thing in a 26.2 one. And inventory slot numbering changed in 25w03a: before then, armour and offhand were stored in the Inventory list as slots 100–103 and −106; from 1.21.5 they are not.
The blunt fix that usually works
If someone's inventory crashes their client on join and you cannot find the offending item, delete their
.datfile with the server stopped. They rejoin as a brand-new player at world spawn with an empty inventory and their level 0, and nothing else on the server is affected. Their builds, their claims, their ranks and their advancements all live elsewhere. Move the file aside rather than deleting it outright, so you can put it back if you were wrong about which one it was.
Common Issues
- The UUID has no file. They have never joined, or the server changed between online and offline mode. Check the third group of the UUID for
3versus4. - The edit reverted. The server was running, or you uploaded to the old path on a server that has been through the 26.1 restructure.
- The file will not open in the editor. It is GZip-compressed NBT; make sure the tool is reading it as NBT and not as text, and check the download completed — a truncated file is a common cause.
- You edited the right tag and nothing changed in game. You edited
.dat_oldrather than.dat. They sit next to each other and the names differ by four characters. - Everyone lost their inventory at once. That is not a player-data problem — it is a UUID-scheme change affecting every file, from
online-modeflipping or from proxy forwarding being wrong. Nothing is deleted; the old files are still there. - The player's ops or whitelist entry also broke. Same root cause: those files key on UUID too. See Minecraft Whitelist and Ban Management.
What to Read Next
- Minecraft World Management — the 26.1 world layout in full, plus region files and chunk deletion
- Minecraft Whitelist and Ban Management — the other UUID-keyed files, and the name-versus-UUID trap
- Minecraft Server Commands —
/data get,/item replace,/clearand the operator command set - Minecraft Grief Protection and Rollback — when the problem is the world rather than one player
- How to upload files via SFTP and How to create a backup — the mechanics used throughout
- Converting a Singleplayer World to a Minecraft Server — why your own singleplayer inventory may not follow you
- Minecraft Op Permission Levels — who should be allowed to run any of this
Primary sources used for this guide (all checked 19 August 2026): the Minecraft Wiki on the Java Edition level format, Player.dat format, UUID, NBT format, /data, /item and the data generators reference; the Mojang profile API; and the release feeds for MCA Selector, Amulet, NBTExplorer and NBT Studio.
Made with 💜 by GameServerKings

Need a Minecraft server?
Deploy an instantly-provisioned Minecraft server on high-clock hardware — DDoS protected, no contracts, cancel anytime.
From $4.80 /month