
Player data & inventories · Java · Intermediate
How to View and Edit a Player's Inventory and Ender Chest in playerdata/<uuid>.dat
Every player in a Minecraft Java Edition world has their personal inventory, armor, and Ender Chest contents stored inside a specific data file tied to their unique account ID. Using our browser-based NBT Editor, you can easily inspect, modify, or delete items directly from these files without ever uploading your world to an external server. This guide will walk you through locating a player's data file and safely editing their items.
What you need
- A Minecraft Java Edition world folder or .zip archive
- The target player's UUID (Universally Unique Identifier)
- Access to our browser-based NBT Editor tool
- A complete backup of your world folder before making any changes
Step by step
1Back Up Your World and Find the Player's UUID
Before altering any game files, create a duplicate copy of your world folder to ensure you can restore it if something goes wrong. Next, make sure the world is completely closed in Minecraft, as the game will overwrite your edits if it is running. To identify which file belongs to the player in a multiplayer world, open the usercache.json file in your server folder with a basic text reader to match their username to their 36-character UUID.
Tip: If you are editing a single-player world, the playerdata folder usually contains only one .dat file, which belongs to you.
2Load the Player Data File in the NBT Editor
Launch our NBT Editor tool directly in your browser. Click to open your world folder or .zip file, or navigate directly into your world's playerdata directory. Select the file named <uuid>.dat that corresponds to the player you want to edit. Because our tool runs entirely in your browser, the file opens instantly without uploading your private world data anywhere.
Tip: Ignore files ending in .dat_old, as those are just automatic backup files generated by Minecraft.
3Inspect and Edit the Main Inventory
Inside the root compound tag, locate and expand the list tag named Inventory. Each compound entry inside this list represents a single occupied slot in the player's inventory, hotbar, armor slots, or off-hand. Expand an entry to view or change its tags: id controls the item type (such as minecraft:diamond_sword), Count (or count in newer versions) sets the stack size, and Slot determines where the item sits in the inventory.
Tip: Hotbar slots are numbered 0 through 8, main inventory slots are 9 through 35, armor slots are 100 through 103, and the off-hand slot is -106 (or 150 depending on how the byte is read).
4Modify the Ender Chest and Item Components
Scroll through the main root tree to find the list tag named EnderItems, which works identically to the main inventory but uses Slot numbers 0 through 26. If you want to edit enchantments, custom names, or durability on an item, look for the tag compound (in older versions) or the components compound (in versions 1.20.5 and newer) inside that specific item entry. You can also delete an entire item compound entry from the list to completely remove a corrupted or unwanted item.
Tip: If you want to add a complex item with specific components, it is often easiest to duplicate an existing item entry in the list and change its Slot number and id.
5Save and Replace the Player Data File
Once you have finished editing the Inventory and EnderItems tags, use the Save button in the NBT Editor to download the modified <uuid>.dat file. Navigate to your world's playerdata folder on your computer and replace the original <uuid>.dat file with your newly edited version. Note that in single-player worlds, you may also need to make the same edits inside the level.dat file under the Data and then Player compound tag, because single-player worlds prioritize that copy upon loading.
How it works
Minecraft Java Edition saves player states using the Named Binary Tag (NBT) format, compressed with GZip inside the playerdata/<uuid>.dat files. Instead of saving empty slots to the file, the game optimizes storage by only creating compound entries inside the Inventory and EnderItems lists for slots that actually contain an item. When the player logs in, the server reads each entry's Slot byte tag and places the item into the corresponding visual grid slot.
In Minecraft 1.20.5 and newer, the underlying item structure underwent a major overhaul. Previously, extra item properties like enchantments, durability (Damage), and custom names were stored inside an unstructured sub-compound called tag, while stack size was a capitalized byte named Count. In modern versions, stack size uses a lowercase integer named count, and all extra properties are strictly organized inside a components compound using namespaced keys like minecraft:damage or minecraft:enchantments.
A critical mechanic for single-player worlds is how level.dat interacts with the playerdata folder. When the host opens a single-player world, Minecraft reads the host's inventory directly from the Player compound nested inside level.dat, completely ignoring their <uuid>.dat file. Therefore, if you are editing the host of a single-player world, you must either apply your edits to level.dat in the NBT Editor, or delete the Player tag inside level.dat so the game is forced to fall back to the edited <uuid>.dat file.
Common mistakes
- Editing a player's .dat file while they are currently logged into the server, or while the single-player world is open to the pause menu, which causes Minecraft to overwrite your changes the moment the player disconnects or saves.
- Only editing playerdata/<uuid>.dat for a single-player world host and forgetting that level.dat holds the primary Player tag that overrides it on single-player startup.
- Assigning two different items within the same Inventory or EnderItems list the exact same Slot number, which causes one of the items to be silently deleted when the player loads into the world.
- Using uppercase Count or the legacy tag compound in Minecraft 1.20.5+ worlds instead of lowercase count and the components compound, resulting in the item failing to load or disappearing.
- Setting an item's stack count higher than its maximum allowed limit (such as 64, or 1 for unstackable tools) without configuring the max_stack_size component in modern versions, which can cause the item to revert or corrupt the player's data.
FAQ
Why did my edits reset as soon as I loaded my single-player world?
In single-player worlds, Minecraft stores a prioritized copy of the host player's data inside the level.dat file under Data -> Player. When you load the world, level.dat overwrites your <uuid>.dat file. To fix this, open level.dat in our NBT Editor and either edit your inventory inside the Player tag there, or delete the Player tag entirely so the game loads your edited <uuid>.dat file instead.
How do I remove a crashed or corrupted item from a player's inventory?
Open the player's <uuid>.dat file in our NBT Editor, expand the Inventory (or EnderItems) list, find the specific compound entry corresponding to the problematic item, and delete that entire slot entry from the list. Save and replace the file.
What are the exact slot numbers for armor and the off-hand?
In the Inventory list, boots are Slot 100, leggings are Slot 101, chestplate is Slot 102, and the helmet is Slot 103. The off-hand slot is stored as a signed byte of -106 (if an editor displays unsigned bytes, it may appear as 150). You can always verify this by placing an item in that slot in-game and checking the file in the NBT Editor.
By loading a player's <uuid>.dat file (and level.dat for single-player hosts) into our browser-based NBT Editor, you can safely view, modify, or remove any item inside the Inventory and EnderItems tags.