Bedrock Edition also has a level.dat, and it plays the same role as in Java: world name, seed, spawn point, game mode, difficulty, cheats and game rules. The file format is different, though, and many NBT tools built for Java can't open it.
How Bedrock's level.dat differs
- Little-endian. Numbers are written with the least significant byte first, the reverse of Java.
- Not compressed. Java's level.dat is gzipped; Bedrock's is raw NBT.
- An 8-byte header. The file starts with two numbers: a storage version, then the length of the NBT data that follows. If an edit makes the data longer or shorter, for instance a longer world name, the length must be updated or the game rejects the file.
The editor recognizes all three when you open the file; the bar above the tree reads Bedrock level.dat. When you download, it writes the same header with the new length, in the same byte order, uncompressed.
Find the file
Bedrock worlds live in com.mojang/minecraftWorlds, one folder per world with a random name. Open levelname.txt in each folder to find yours. On current Windows versions the path is %APPDATA%\Minecraft Bedrock\Users\<user ID>\games\com.mojang\minecraftWorlds; the save locations guide lists the others.
A world exported as .mcworld is a zip archive. Rename a copy to .zip, extract it, and you will find level.dat inside.
Useful tags
- { }root
- StrLevelName"Island survival"
- IGameType0
- IDifficulty2
- BcommandsEnabled0
- LRandomSeed9123372036854775807
- ISpawnX0
- ISpawnY64
- ISpawnZ0
- Bkeepinventory0
- Bdodaylightcycle1
- Irandomtickspeed1
- { }abilities
| Goal | Tag | Values |
|---|---|---|
| Rename the world | StrLevelName | Also update levelname.txt so both match |
| Default game mode | IGameType | 0 survival, 1 creative, 2 adventure |
| Difficulty | IDifficulty | 0 peaceful, 1 easy, 2 normal, 3 hard |
| Cheats | BcommandsEnabled | 1 on, 0 off |
| Game rules | Bkeepinventory, Bdodaylightcycle… | Lowercase names directly in the root compound; Byte for on/off rules, Int for numbers |
| World spawn | ISpawnX, ISpawnY, ISpawnZ | Block coordinates; pick a spot above ground |
Step by step
- Close Minecraft completely. On Windows, check that it isn't still running in the background.
- Copy the whole world folder as a backup.
- Open
level.datin the editor and check the bar says Bedrock level.dat. - Change the values you need. Keep each value's type: Bedrock reads Bytes and Ints as they were.
- Download and replace
level.datin the world folder. Leavelevel.dat_oldalone. - Start the game and open the world's settings to check the change.
What isn't in level.dat
Player inventories, positions, chunks, entities and block entities are stored in the db folder, a LevelDB database with many small files. Each record inside is NBT, but the database itself is not, so it can't be opened as a single file. To edit inventories or terrain in Bedrock, use a world editor that understands LevelDB, such as Amulet.
Realms and servers
For a Realm, download the world to your device first, edit it there, then upload it again from the Realm settings. A Bedrock Dedicated Server keeps the world in its worlds folder; stop the server before editing, because it overwrites level.dat when it saves.