Server world admin · Java · Intermediate

How to Set a Server World Border and Delete All Chunks Outside It

Unrestricted exploration on a Minecraft Java Edition server can quickly bloat your world size to tens of gigabytes. By establishing a hard world border and purging all generated terrain beyond it, you can drastically reduce disk usage and speed up server backups. This guide shows you how to configure your border settings in level.dat and delete out-of-bounds chunks using our browser-based tools, where your files are processed locally and never uploaded.

Open the Chunk TrimmerPaint chunks on the map and delete them, or remove every chunk nobody really visited.

What you need

  • A Minecraft Java Edition world folder or .zip archive
  • Access to the NBT Editor and Chunk Trimmer on our site
  • The desired center coordinates (X, Z) and total diameter for your border
  • A complete backup copy of your world folder stored safely on your computer

Step by step

  1. 1Shut Down the Server and Back Up Your World

    Before modifying any world files, stop your Minecraft server completely so it saves all pending data and releases file locks. Copy your entire world folder (or download it from your host as a .zip) to a separate location on your computer. Modifying NBT data and trimming chunks are permanent actions, so having an untouched backup ensures you can restore your server if you make a calculation error.

    Tip: Never edit live server files while the server is running, as the game will overwrite your changes when it shuts down.

  2. 2Configure the Border in level.dat

    Open the NBT Editor on our site and select Open world folder or .zip to load your world, or load the level.dat file directly. Expand the root Data compound tag and scroll down to find BorderCenterX, BorderCenterZ, and BorderSize. Set BorderCenterX and BorderCenterZ to the exact block coordinates for the middle of your map (commonly 0 and 0), then change BorderSize to the total width of your border in blocks. Save the changes and replace your old level.dat with the newly downloaded file.

    Tip: Remember that BorderSize is the full diameter, not the radius—a value of 10000 creates a border extending 5,000 blocks in each direction from the center.

  3. 3Calculate Your Bounding Coordinates

    To trim the world accurately, you need to know where the border edges lie in block and chunk coordinates. Divide your BorderSize by 2 to get the radius, then add and subtract that radius from your BorderCenterX and BorderCenterZ to find your minimum and maximum block coordinates. For example, a center at (0, 0) with a BorderSize of 10000 gives a block range from -5000 to +5000 on both the X and Z axes. Because chunks are 16x16 blocks, divide your block coordinates by 16 (rounding outward) to get the corresponding chunk coordinates if needed.

    Tip: Always leave a small buffer of 2 to 4 extra chunks outside the border so players looking through the barrier see natural terrain instead of an abrupt void.

  4. 4Load Your World into the Chunk Trimmer

    Navigate to the Chunk Trimmer on our site and click Open world folder or .zip to load your world directory. The tool will read your Overworld region files directly from the region subfolder (and DIM-1/region or DIM1/region if you switch dimensions) without uploading anything to the internet. Wait a moment for the 2D map preview of your generated chunks and regions to finish rendering.

  5. 5Select and Purge Out-of-Bounds Chunks

    In the Chunk Trimmer interface, define your keep zone using the bounding coordinates you calculated earlier, or drag the selection box to cover the area inside your new world border. Ensure the tool is set to keep the selected area inside the border and delete everything outside of it. Execute the trim and download the cleaned region files or the updated world archive, then replace the old region folder on your server with the trimmed version.

    Tip: If you want to trim the Nether as well, divide your Overworld border coordinates by 8 to account for the 1:8 Nether coordinate scale, unless you want the Nether to use the full unscaled border size.

How it works

In Minecraft Java Edition, the world border is a built-in mechanic controlled by specific double-precision floating-point tags inside the level.dat file. The game reads BorderCenterX, BorderCenterZ, and BorderSize upon startup to render the animated diagonal barrier and prevent players from walking or teleporting past it. However, setting a world border only restricts player movement; it does not automatically clean up terrain that was generated before the border was shrunk.

World terrain, entities, and points of interest are stored in the region, entities, and poi folders as .mca (Anvil) files. Each .mca file holds a 32x32 grid of chunks (512x512 blocks). When you use the Chunk Trimmer, it evaluates the chunk coordinates against your selection box. If an entire .mca file falls outside your border, the file can be removed completely; if a region file straddles the border line, the tool rewrites the file header to clear the individual out-of-bounds chunks while keeping the interior chunks intact.

Common mistakes

  • Confusing BorderSize (diameter) with radius, resulting in a world that is half as wide as intended and accidentally deleting the outer edges of player builds.
  • Trimming the exact border line without leaving a visual buffer, which causes players standing near the edge to see empty void or experience harsh lighting glitches across the barrier.
  • Only replacing the files in the region folder while forgetting to trim or sync the matching .mca files in the entities and poi folders (in Minecraft 1.17+), which can leave orphaned mobs or villager job sites.
  • Uploading the trimmed region files back to the server via FTP without deleting the old out-of-bounds .mca files first, which leaves the old distant regions intact on the server disk.

FAQ

Why not just use the /worldborder command in-game?

You can use the /worldborder command to set the barrier while the server is running, and it will update level.dat for you. However, the in-game command never deletes previously generated chunks outside the border, so you still need the Chunk Trimmer to reclaim disk space.

What happens if I expand the border later after trimming?

Any chunks that were deleted by the Chunk Trimmer are completely gone from the disk. If you make BorderSize larger in the future and players walk into those areas, the server will simply generate brand-new terrain using the world seed and your current Minecraft version's terrain generator.

Does the Overworld border also restrict the Nether and the End?

Yes, in modern Java Edition, the world border applies the same BorderSize and center coordinates to all dimensions. Keep in mind that because 1 block in the Nether equals 8 blocks in the Overworld, players traveling near the Nether border could attempt to link to portals beyond the Overworld border, though the game will clamp teleportation inside the active barrier.

By setting BorderCenter and BorderSize in level.dat and purging external chunks with the Chunk Trimmer, you can permanently cap your server's map size and reclaim valuable disk space.

More server world admin guides

Server world adminHow Paper/Bukkit Splits world_nether and world_the_end vs Vanilla SavesMoving a Minecraft Java Edition world between a Vanilla or Fabric setup and a Paper, Spigot, or Bukkit server often results in players losing their Nether and End progress. This happens because Bukkit-based servers store dimensions in separate root directories rather than nesting them inside the main world folder. This guide explains the exact directory logic so you can merge or split your dimension folders safely without losing a single chunk.JavaIntermediate4 steps
Server world adminHow to Move Your Server Spawn Point and Adjust Spawn Chunk RadiusRelocating your server's default arrival point and trimming the permanently loaded area around it is one of the fastest ways to boost server performance and organize your player hub. By modifying the master configuration file of your Minecraft Java Edition world, you can set exact arrival coordinates and fine-tune how many chunks stay active in memory at all times. This guide walks you through safely editing these tags right in your browser without uploading any files.JavaIntermediate5 steps
Server world adminHow to Pre-Generate a Server World and Verify Coverage in the Map ViewerGenerating new terrain on the fly is the single biggest cause of server lag in Minecraft Java Edition. By pre-generating chunks within a set world border before players join, you shift that heavy CPU workload to an idle setup period. After running the generation task, you can use our browser-based World Map Viewer to visually audit your region files and ensure there are no missing gaps in the terrain.JavaIntermediate5 steps
Server world adminHow to Prepare and Shrink a SMP Server World Download at the End of a SeasonAt the end of an SMP season, sharing the world download lets everyone preserve their builds, but raw server folders are often bloated to dozens of gigabytes and full of sensitive admin files. By trimming unvisited chunks and cleaning out server logs and metadata, you can easily reduce your file size by up to 80% while protecting player privacy. All tools on this site process your world locally in your browser so your massive files never need to upload.Java & BedrockIntermediate5 steps
Server world adminHow to Reset the Nether or the End Dimension Without Losing Your OverworldResetting the Nether or the End is the best way to generate new update features, refresh looted structures, or shrink an overgrown save file without losing your Overworld builds. Whether you play on Java or Bedrock Edition, you can either wipe a dimension completely or use our browser-based Chunk Trimmer to selectively delete unused areas while preserving your Nether hubs and End farms. Because our tools run entirely in your browser, your world files are processed locally and never uploaded to any server.Java & BedrockBeginner5 steps