
World file format explained · Java · Intermediate
Complete Reference to Every Field in Minecraft's level.dat File
The level.dat file is the brain of every Java Edition Minecraft world, storing everything from the global random seed and weather cycle to boss fight progression and gamerules. Understanding what every root tag inside the Data compound does gives you complete control over your world's mechanics and behavior. Using our browser-based level.dat Editor, you can safely inspect and modify these settings locally on your machine without uploading your private world files anywhere.
What you need
- A Minecraft Java Edition world folder or .zip archive
- A complete backup copy of your world folder stored in a safe location
- Access to the level.dat Editor on world.9minecraft.net
Step by step
1Back Up Your World and Open the level.dat Editor
Before altering any core world data, make a duplicate of your entire world folder inside your Minecraft saves directory so you can easily revert if something goes wrong. Next, open the level.dat Editor on our site and click Open world folder or .zip to load your world directly into your browser memory. The tool will parse the file and display a folder-like tree starting with a single root compound named Data.
Tip: Always close your world in Minecraft before editing level.dat, otherwise the game will overwrite your edits the moment you save and quit.
2Core Identity, Time, and Game State Fields
Expand the Data compound to view the fundamental properties that identify and govern your save. LevelName holds the display string shown in your singleplayer menu, while GameType (0 for Survival, 1 for Creative, 2 for Adventure, 3 for Spectator), Difficulty (0 to 3), hardcore (0 or 1), and allowCommands (0 or 1) control basic gameplay rules. Time tracks the total ticks elapsed since the world was created, whereas DayTime controls the current 24000-tick sun and moon cycle. You will also see LastPlayed (a Unix timestamp in milliseconds), initialized (set to 1 once the world finishes initial setup), and spawn coordinate integers named SpawnX, SpawnY, and SpawnZ alongside SpawnAngle.
Tip: If you ever lock your difficulty in-game by accident, simply change DifficultyLocked from 1 back to 0 right here.
3Weather and World Border Fields
Minecraft manages weather using two active toggles and three countdown timers measured in game ticks (20 ticks equal one second). The raining and thundering tags are byte values (0 or 1) that state what is happening right now, while rainTime, thunderTime, and clearWeatherTime count down until the weather state switches. For the world boundary, BorderCenterX and BorderCenterZ set the middle point, while BorderSize sets the diameter in blocks (defaulting to 60,000,000) and BorderLerpTarget paired with BorderLerpTime manages shrinking or expanding animations. BorderSafeZone and BorderDamagePerBlock govern how far outside the barrier a player can step before taking damage and how much health they lose per block, while BorderWarningBlocks and BorderWarningTime trigger the red screen tint.
Tip: To clear rain for a long duration, set raining and thundering to 0, and set clearWeatherTime to a high tick number like 120000.
4Dimension Generation and WorldGenSettings
Expanding the WorldGenSettings compound reveals how the terrain generator builds new chunks. Here you will find seed (the 64-bit integer responsible for terrain randomness), generate_features (1 to spawn structures like villages, 0 to disable), and bonus_chest. Inside the nested dimensions compound, separate entries for minecraft:overworld, minecraft:the_nether, and minecraft:the_end define the exact biome source and noise settings (such as large_biomes or flat) used for each realm. Editing these values affects only newly generated chunks, leaving already explored areas untouched.
Tip: If you are using an older world from before version 1.16, look for randomSeed and generatorName directly inside the main Data root instead of WorldGenSettings.
5End Progression, Wandering Traders, and Boss Events
Dynamic world events have dedicated compounds and tags to maintain their state across play sessions. The DragonFight compound tracks the End dimension's boss state, including DragonKilled, PreviouslyKilled, the active Dragon UUID, and a Gateways list storing which End Gateway portals remain to be spawned. WanderingTraderSpawnDelay (counting down in ticks, usually starting at 24000) and WanderingTraderSpawnChance (a percentage from 25 to 75) determine when the next trader arrives, while WanderingTraderId holds the UUID of the currently active trader. Finally, CustomBossEvents stores any command-created boss bars, and ScheduledEvents holds pending function timers created via the schedule command.
Tip: Deleting the DragonFight compound or resetting PreviouslyKilled to 0 allows the next Ender Dragon defeat to drop a brand new Dragon Egg.
6GameRules, DataPacks, Player, and Version History
The GameRules compound is a straightforward list of string values (such as keepInventory or doDaylightCycle) set to true or false, or integer numbers like randomTickSpeed. DataPacks contains two lists—Enabled and Disabled—governing which vanilla features and custom data packs are active in the world. For singleplayer saves, the Player compound holds the host player's complete inventory, position, health, and Ender Chest contents, overriding their individual file in the playerdata folder. Lastly, Version (a compound showing the exact Id, Name, and Series), DataVersion, WasModded, and ServerBrands keep a permanent log of the game versions and mod loaders that have opened the world.
Tip: After finishing your inspections or edits in the level.dat Editor, click the Save or Download button and replace the original level.dat file in your world folder.
How it works
Minecraft stores the level.dat file using the Named Binary Tag (NBT) format, which is subsequently compressed using standard GZip compression. Because it is binary and compressed, opening level.dat in a regular text editor produces unreadable gibberish. Our browser-based level.dat Editor automatically decompresses the GZip stream in your computer's RAM and translates the binary structure into a readable hierarchy of tags.
Every tag in the NBT specification has a strict data type—such as Byte (8-bit integer), Int (32-bit integer), Long (64-bit integer), Double (floating-point decimal), String (text), List, or Compound (a folder of tags). The game engine expects each field in the Data root to keep its exact data type and capitalization. For instance, boolean toggles like raining are actually stored as Byte tags with a value of 0 or 1, whereas GameRules store their values as text Strings ('true' or 'false') even when representing numbers.
Why does singleplayer store player data inside level.dat while multiplayer uses the playerdata folder? This is a legacy design from early Minecraft versions when worlds only supported one player. Today, whenever you load a world in singleplayer, the game reads the Player compound inside level.dat first; if you move that world to a dedicated server, the server ignores the level.dat Player compound and instead reads the UUID-named files inside the playerdata directory.
Common mistakes
- Editing level.dat while the world is still paused in the background, which causes Minecraft to immediately overwrite your custom file when you exit to the title screen.
- Typing 'true' or 'false' into Byte fields like hardcore or allowCommands instead of using the numbers 1 or 0 (only the GameRules compound uses text strings for true and false).
- Setting clearWeatherTime to a positive number while trying to force rain with raining set to 1; clearWeatherTime overrides active precipitation until it reaches 0.
- Modifying the seed inside WorldGenSettings expecting existing builds and terrain to change, which instead causes sharp chunk cliffs where old terrain meets newly generated chunks.
FAQ
Why are my changes to the playerdata folder not working in singleplayer?
In singleplayer, Minecraft always prioritizes the Player compound stored inside level.dat for the world owner. You must edit your inventory, health, or coordinates inside level.dat's Player tag, or delete the Player compound entirely so the game falls back to the playerdata folder.
What is the level.dat_old file in my world folder?
Every time Minecraft successfully saves your level.dat file, it renames the previous version to level.dat_old as an automatic fallback. If your main level.dat ever becomes corrupted, you can delete it and rename level.dat_old to level.dat to restore your settings.
How can I check the exact DataVersion number for my Minecraft release?
If you are unsure of the exact DataVersion integer for a specific update, create a fresh test world in that version of Minecraft, load it into our level.dat Editor, and look at the DataVersion tag inside the Version compound.
By mastering the root Data fields inside level.dat with our browser-based level.dat Editor, you can safely customize everything from weather timers and world borders to dimension generation and boss fight states without leaving your browser.