Wiki 9Minecraft Wiki 9Minecraft

Enabling Experiments by Editing World NBT

How to toggle experimental features in level.dat without copying the world or using the UI.

5Sections
1Code examples
3Known errors

When developing Bedrock add-ons, you often need to enable experimental toggles on an existing world or a dedicated server where the world settings UI locks or hides those switches. By editing the world's `level.dat` file directly with a Bedrock-compatible NBT editor, you can enable or disable specific experiments in place without generating a duplicate world. This is also the standard way to turn on hidden internal toggles or clean up obsolete flags before packaging a world template.

Why Edit level.dat Directly

Normally, enabling an experimental toggle in the Minecraft Bedrock menu forces the game to create a copy of your world if that world has already been opened. When you are iterating quickly on a behavior pack or updating an existing world template, constantly managing copied world folders becomes tedious and error-prone.

Direct NBT editing is also essential for Bedrock Dedicated Server (BDS) administrators. The `server.properties` file does not expose individual add-on experiment toggles like Beta APIs or Upcoming Creator Features. To run an experimental pack on a server, you must either create the world locally, flip the switches, and upload it, or edit the server's `level.dat` file directly using an external tool.

Locating and Opening level.dat

Every Bedrock world folder contains a file named `level.dat` at its root. Unlike Java Edition, which uses a big-endian GZip-compressed NBT format, Minecraft Bedrock's `level.dat` is uncompressed, stored in little-endian byte order, and begins with an 8-byte header (4 bytes for the storage version and 4 bytes for the payload length). Because of this header, standard Java NBT editors will fail to open the file unless they specifically support Bedrock formats.

Before touching `level.dat`, close the world completely—or stop the dedicated server process—and make a backup copy of the file. Open `level.dat` in a Bedrock-capable NBT editor. At the root of the NBT tree, look for a Compound tag named `experiments`. If the world has never had an experiment enabled, this compound tag might be empty, or you may need to create it yourself under the root compound.

The experiments Compound Tag

Inside the `experiments` compound tag, each experimental toggle is stored as a `TAG_Byte` (which acts as a boolean: `1` for true, `0` for false). In addition to the individual feature flags, there are two metadata bytes that control how the game treats the world as a whole: `experiments_ever_used` and `saved_with_toggled_experiments`.

When enabling an experiment manually, you must add or set the specific feature's byte tag to `1`, and you must also set both `experiments_ever_used` and `saved_with_toggled_experiments` to `1`. If you forget the two metadata flags, Minecraft may ignore the individual feature toggles when loading the world, or fail to mark the world as experimental.

NBT Byte KeyUI Toggle EquivalentNotes
experiments_ever_used(Internal flag)Must be set to 1 when any experiment is active. Disables achievements.
saved_with_toggled_experiments(Internal flag)Must be set to 1 so the engine reads the active experiment tags on load.
gametestBeta APIsRequired for `-beta` Script API modules such as `@minecraft/server` beta versions.
data_driven_itemsHoliday Creator FeaturesLegacy toggle in older versions; removed from the UI in recent releases as features stabilized or moved.
upcoming_creator_featuresUpcoming Creator FeaturesEnables newer block, item, or entity properties currently in preview.
experimental_molang_featuresExperimental Molang FeaturesEnables in-development Molang queries and math functions.
data_driven_biomesCustom BiomesAllows behavior packs to register custom biome JSON files.
camerasExperimental CamerasUsed for in-development camera presets and command features before stabilization.

Connecting NBT Toggles to Pack Code

The most common reason to edit `level.dat` is to enable the `gametest` byte so your world can run scripts that depend on Beta APIs. Notice how the internal NBT name (`gametest`) reflects the original name of the GameTest Framework, even though the user interface now calls this toggle "Beta APIs".

Once `gametest`, `experiments_ever_used`, and `saved_with_toggled_experiments` are all set to `1` in `level.dat`, the world will accept a behavior pack `manifest.json` that declares a `-beta` version dependency without throwing a missing dependency error.

BP/manifest.json
{
  "format_version": 2,
  "header": {
    "name": "Beta Script Test Pack",
    "description": "Requires the gametest NBT byte set to 1 in level.dat",
    "uuid": "6b18763e-0c42-4847-9b63-882497a19a21",
    "version": [1, 0, 0],
    "min_engine_version": [1, 21, 0]
  },
  "modules": [
    {
      "type": "script",
      "language": "javascript",
      "uuid": "c8d92b10-5b2e-4f89-993a-2b1e7c441234",
      "entry": "scripts/main.js",
      "version": [1, 0, 0]
    }
  ],
  "dependencies": [
    {
      "module_name": "@minecraft/server",
      "version": "1.14.0-beta"
    }
  ]
}

Removing Experimental Flags Safely

When an experimental feature graduates to stable in a new Minecraft update (or when you rewrite your script to use a stable release version of `@minecraft/server` instead of `-beta`), you may want to remove the `[Experimental]` tag from your world so players do not see warnings and achievements can function in template copies.

To strip experimental status from a world, open `level.dat`, expand the `experiments` compound, and either set every `TAG_Byte` inside it to `0` or delete all the byte tags inside `experiments`—including `experiments_ever_used` and `saved_with_toggled_experiments`. Be cautious if your world contains custom blocks or entities generated under an experiment that has not cleanly migrated to stable, as loading the world without the toggle may cause those blocks to turn into `minecraft:info_update` placeholder blocks.

Which versions this applies to

Applies to all modern Minecraft Bedrock versions (1.16.100 through 1.21+). The exact byte keys inside the experiments compound change over time as Mojang introduces new preview features and retires old toggles like Holiday Creator Features.

When it does not work

What you seeWhyThe fix
Content Log Error: [Scripting] Pack declares a dependency on '@minecraft/server' version '1.14.0-beta', which is not enabled on this world.You added the `gametest` byte set to `1`, or you thought the tag was named `beta_apis`, or you forgot to set `experiments_ever_used` and `saved_with_toggled_experiments` to `1`.Ensure the tag is named `gametest` (all lowercase) of type `TAG_Byte` with value `1`, and verify both `experiments_ever_used` and `saved_with_toggled_experiments` are also present as `TAG_Byte` set to `1` inside the `experiments` compound.
Your edits to `level.dat` revert back to the old values as soon as you open the world.You edited `level.dat` while the world was still loaded in Minecraft, or while the Pause / Edit World screen had the file cached in memory. When the game closed or exited the menu, it overwrote your changes.Always save and quit to the main menu—or completely close Minecraft / stop the Dedicated Server—before opening and saving `level.dat` in your NBT editor.
The world disappears from the Worlds list or fails to load with a corrupted world message after saving `level.dat`.The NBT editor saved the file using Java Edition's big-endian GZip format, or failed to update the 8-byte little-endian Bedrock header at the start of the file.Restore `level.dat` from your backup copy and use an NBT editor that explicitly supports Bedrock Edition's uncompressed little-endian `level.dat` header format.

Reference, straight from the game files

Read out of the game itself, so the ids match the version you are building for.