# How to Edit Minecraft Level Data with NBTExplorer (/docs/minecraft/edit-level-data)



NBTExplorer lets you directly edit your world's `level.dat` file to change spawn coordinates, difficulty, game type, and other world settings that aren't accessible through server.properties.

Editing Level Data [#editing-level-data]

<div className="fd-steps">
  <div className="fd-step">
    Download your world [#1-download-your-world]

    Access the [XGamingServer panel](https://panel.xgamingserver.com), stop your server, go to `Files`, and [download your world folder](/docs/minecraft/download-world).
  </div>

  <div className="fd-step">
    Install NBTExplorer [#2-install-nbtexplorer]

    Download NBTExplorer from GitHub (Windows/Mac/Linux). Open the application.
  </div>

  <div className="fd-step">
    Open level.dat [#3-open-leveldat]

    In NBTExplorer, navigate to your downloaded world folder and open `level.dat`. Expand the `Data` tag to see all world settings.
  </div>

  <div className="fd-step">
    Edit the values [#4-edit-the-values]

    Common edits:

    | Tag                          | Type   | Description                                      |
    | ---------------------------- | ------ | ------------------------------------------------ |
    | `SpawnX`, `SpawnY`, `SpawnZ` | Int    | World spawn coordinates                          |
    | `Difficulty`                 | Byte   | 0=Peaceful, 1=Easy, 2=Normal, 3=Hard             |
    | `GameType`                   | Int    | 0=Survival, 1=Creative, 2=Adventure, 3=Spectator |
    | `LevelName`                  | String | World name                                       |
    | `DayTime`                    | Long   | Current time of day (in ticks)                   |
    | `rainTime`, `thunderTime`    | Int    | Weather cycle timers                             |
    | `hardcore`                   | Byte   | 0=Normal, 1=Hardcore                             |
  </div>

  <div className="fd-step">
    Save and re-upload [#5-save-and-re-upload]

    Save in NBTExplorer (Ctrl+S), then re-upload the modified `level.dat` to your server via `Files`.
  </div>

  <div className="fd-step">
    Start your server [#6-start-your-server]

    Start the server to use the modified world settings.

    > ⚠️ **Warning:** Always back up `level.dat` before editing. A corrupted level.dat can make your world unloadable.

    > 💡 **Tip:** For simple changes like difficulty or game mode, it's easier to use `Console` commands or `Startup` settings instead of NBTExplorer.

    See also: [Edit Player Data](/docs/minecraft/edit-player-data) | [Download World](/docs/minecraft/download-world)

    If you need help, join our [Discord](https://discord.xgamingserver.com/).
  </div>
</div>
