Nether X = floor(Overworld X ÷ 8) | Nether Y = Overworld Y (1:1) | Nether Z = floor(Overworld Z ÷ 8)
How Nether Portal Coordinate Linking Works in Minecraft 1.21+
Space in the Nether is compressed horizontally by an exact 8:1 ratio compared to the Overworld. Travelling 1 block in the Nether along the X or Z axis equals 8 blocks in the Overworld. However, the vertical Y-axis remains 1:1 — and ignoring the Y height is the #1 reason players accidentally link multiple portals into the same destination.
Nether X = Math.floor(Overworld X / 8)
Nether Y = Overworld Y (1:1 Height)
Nether Z = Math.floor(Overworld Z / 8)
The 3-Phase Portal Search Algorithm
- Coordinate Scaling: When you step into a portal block, Minecraft converts your current X and Z coordinates using the 8:1 factor while preserving your exact Y coordinate.
- Bounding Box Scan (128 vs 16 Blocks): The game scans a horizontal square radius around the target point for existing active portal blocks:
- Entering the Overworld: scans
±128 blocksin X/Z (a257 × 257column across all Y levels). - Entering the Nether: scans
±16 blocksin X/Z (a33 × 33column across all Y levels).
- Entering the Overworld: scans
- 3D Euclidean Distance Selection: If multiple active portal blocks exist inside that search zone, Minecraft picks the single portal block with the shortest straight-line 3D distance:
d = √(ΔX² + ΔY² + ΔZ²).
Step-by-Step Guide to Perfect Two-Way Portal Linking
- Build and light your primary portal in the Overworld. Stand in the bottom middle obsidian blocks and press
F3(Java) or enable Show Coordinates (Bedrock) to recordX, Y, Z. - Enter those coordinates into the Overworld Coordinates panel above to get the exact target Nether
X, Y, Z. - Travel into the Nether, locate the exact calculated coordinates, and build a new obsidian frame at that exact X, Z, and closest possible Y elevation.
- Break the auto-generated Nether portal if the game spawned it inside a cave or over a lava ocean far from your calculated coordinates.
Frequently Asked Questions
Why does my Nether portal link to an existing portal instead of creating a new one?
Minecraft searches up to 128 blocks away in the Overworld (or 16 blocks in the Nether) before generating a new frame. If another active portal exists inside that bounding box, the game redirects you to it. To fix this, manually build and light a second portal in the Nether at the exact X, Y, Z divided by 8.
Does the Y (height) coordinate matter when linking Nether portals?
Yes! While X and Z are scaled by 8, the Y coordinate is used at a 1:1 ratio when calculating 3D Euclidean distance between competing portals. Matching the Y level is essential when building stacked farms or Nether roof hubs.
Can I link portals on the Nether Roof (Y ≥ 128)?
In Minecraft Java Edition, portals placed on the Nether bedrock ceiling (Y = 128 to Y = 255) work and link normally in both directions. In Bedrock Edition, blocks cannot be placed at Y ≥ 128 in the Nether.
How close can two separate Overworld portals be without colliding?
If you let the game auto-generate Nether portals, they must be more than 128 blocks apart in the Overworld. However, if you manually build both corresponding Nether portals at their exact 1:8 coordinates and match their Y heights, portals can be as close as 16–24 blocks apart in the Overworld!