
level.dat & world settings · Java & Bedrock · Beginner
How to Edit Minecraft GameRules Offline Using the level.dat Editor
Modifying Minecraft GameRules offline allows you to adjust core world behaviors—like keeping your inventory upon death or stopping Creepers from destroying blocks—before you even load into the game. By editing the level.dat file directly, you can change these rules without needing to enable in-game cheats or lose advancement eligibility. This guide walks you through safely updating your world's configuration for both Java and Bedrock editions using our browser-based level.dat Editor.
What you need
- Access to your Minecraft world folder or a .zip archive of your world
- The level.dat Editor on our site (runs locally in your browser without uploading files)
- A complete backup copy of your world folder
Step by step
1Close Minecraft and Back Up Your World
Ensure that Minecraft is completely closed, or at least that you have exited the specific world to the main menu. Navigate to your Minecraft saves directory (the 'saves' folder for Java Edition, or the 'minecraftWorlds' folder for Bedrock Edition) and locate your world folder. Copy the entire world folder to a safe location on your computer to serve as a backup. Editing world files while the game is actively running can cause the game to overwrite your manual changes when it closes, or even corrupt the save file.
Tip: If you cannot recognize your Bedrock world folder by its random string of letters and numbers, open the levelname.txt file inside each folder to find the right one.
2Load Your World into the level.dat Editor
Open the level.dat Editor on our site. Click the button to open your world folder or .zip file, or simply locate the specific level.dat file inside your world folder and select it. Because our tool processes everything locally inside your browser, your files are never uploaded to a server and the NBT structure will appear almost instantly.
3Locate the GameRules Section
The location of the rules depends on which edition you play. For Java Edition, expand the root 'Data' compound tag, scroll down, and expand the 'GameRules' compound tag to see all rules neatly grouped together. For Bedrock Edition, there is no separate GameRules folder; the rules are stored directly inside the root compound alongside your world name and seed, usually formatted in all-lowercase letters.
Tip: Use the search or filter bar inside the level.dat Editor to quickly jump to specific tags like 'keepInventory' or 'mobGriefing'.
4Modify Your Desired GameRules
Click on the values of the rules you want to change, paying close attention to the data format required by your edition. In Java Edition, all GameRules are saved as String tags (text), so you must type the exact lowercase words 'true' or 'false' for rules like keepInventory, doDaylightCycle, and mobGriefing, or type a number as text (like '3') for randomTickSpeed. In Bedrock Edition, boolean rules are stored as Byte tags where you must enter '1' for true or '0' for false (for example, setting 'keepinventory', 'dodaylightcycle', or 'mobgriefing' to 1 or 0), while 'randomtickspeed' is an Integer tag where you enter a standard whole number.
Tip: The default randomTickSpeed is 3 in Java Edition and 1 in Bedrock Edition; setting this number too high can cause severe block-update lag.
5Save and Replace Your level.dat File
Once you have finished editing the tags, click the Save or Download button in the level.dat Editor to export your modified level.dat file. Move this new file into your active Minecraft world folder, choosing to overwrite the existing level.dat file when prompted by your operating system. Launch Minecraft and load your world to immediately experience your updated GameRules.
How it works
Every Minecraft world relies on a master configuration file named level.dat, which is formatted using Named Binary Tag (NBT) structure. Think of NBT as a digital filing cabinet made of nested folders (Compound tags) and individual data entries (Strings, Integers, and Bytes). When you load a world, Minecraft reads this file first to determine global parameters like the world seed, current time, player inventory, and GameRules.
Java Edition and Bedrock Edition handle GameRules differently under the hood due to their distinct codebase histories. In Java Edition, the game stores all GameRules inside a dedicated 'GameRules' compound tag, and remarkably, every single value is saved as a text String—even numbers and true/false toggles. The Java engine simply parses that text into functional booleans or integers when the world boots up.
Bedrock Edition flattens this structure by placing GameRule tags directly into the root level of the level.dat file without a grouping folder. Instead of strings, Bedrock strictly uses binary Byte tags (where 0 means false and 1 means true) and Integer tags for numerical rules, while also attaching a special 8-byte header to the front of the file to track the storage version. Our level.dat Editor automatically detects and preserves these structural differences so your file remains valid upon saving.
Common mistakes
- Editing the level.dat file while the world is still open in Minecraft, which causes the game to overwrite your newly saved file the moment you click 'Save and Quit'.
- Using capital letters like 'True' or 'FALSE' in Java Edition; the Java game parser is strictly case-sensitive and will only recognize lowercase 'true' or 'false'.
- Typing the words 'true' or 'false' into a Bedrock Edition Byte tag instead of using the numerical values '1' and '0'.
- Forgetting to move the downloaded level.dat file from your browser's Downloads folder into your actual Minecraft world folder, leaving the original file unchanged.
FAQ
Will editing GameRules in level.dat disable achievements or advancements?
No. Modifying a specific GameRule like keepInventory directly in the level.dat file does not disable advancements in Java Edition. In Bedrock Edition, achievements remain active as long as you only edit the rule itself and do not change the 'hasBeenLoadedInCreative' or 'commandsEnabled' tags to 1.
Why is my OS renaming the downloaded file to level (1).dat?
If a file named level.dat already exists in your Downloads folder, your browser will add a number to prevent overwriting it. You must ensure the file is named exactly 'level.dat' when you place it inside your Minecraft world folder, or the game will ignore it.
What is the level.dat_old file in my world folder?
Minecraft automatically generates level.dat_old as an emergency backup of your previous session's settings. You do not need to edit or delete it; Minecraft will update it automatically the next time your world saves normally.
By adjusting the NBT tags inside your world's level.dat file with our browser-based editor, you can safely customize GameRules offline for both Java and Bedrock editions without enabling cheats.