An XP farm ends the grind for levels. Once one runs you stop fighting for every enchant and start freely repairing, enchanting, and combining gear at an anvil. The best XP source in Minecraft 26.2 Java Edition depends on where you are in the game, so this guide ranks the realistic options and then walks through a working dark-room mob grinder, the build most players start with.
This guide is version-pinned to 26.2 and part of our Minecraft farm guides collection.
Tested on: Minecraft 26.2, Java Edition, vanilla survival. Mechanics described are documented behavior; XP rates depend heavily on your build size and AFK placement, so measure your own setup.
The single rule behind XP farms
Most XP-bearing mobs only drop experience when a player lands the killing blow. Fall damage, lava, and suffocation kill the mob but give no XP. This is why every XP farm brings mobs to near-death automatically, then lets you deliver the final hit.
The exceptions are the spawner-based and mob-cap farms where you still personally kill, and a handful of redstone-only farms (like some crop and bamboo setups) that give no XP at all. If a farm is "XP", a player is doing the killing.
XP sources ranked for 26.2
| Source | XP rate | Effort | Best for |
|---|---|---|---|
| Gold farm (zombified piglins) | Very high | High (nether roof) | Midgame onward; every kill is a player kill |
| Dark-room mob grinder | Medium | Low | Early game; also drops gunpowder, bones, string, arrows |
| Spawner farm (cave spawner) | Medium | Low if you find one | Early; a found dungeon spawner is a free farm |
| Enderman farm (End / warped forest) | Very high | High | Late game; the best raw XP in the game |
| Furnace XP / smelting | Low | Trivial | Passive bonus, not a primary source |
For most players the path is: a dark-room grinder or a found spawner early, a gold farm once you can reach the nether roof, and an enderman farm late if you want the absolute best XP per hour.
The dark-room mob grinder (the starter build)
The most accessible XP farm is a dark-room spawning platform that funnels common hostile mobs to a player kill spot. It teaches the spawning rules every other mob farm reuses, which is why it is the general mob farm we recommend learning first.
A working dark-room XP farm has four parts.
1. The dark spawning platform
Hostile mobs spawn on solid blocks at light level 0 with two blocks of air above. Build a large enclosed, fully dark platform (or several stacked) to maximise spawnable surface. The more eligible dark surface in range, the faster the mob cap fills with mobs on your platform.
2. The funnel
Water streams push spawned mobs off the platform toward a central drop. Mobs path with the current to a single hole.
3. The fall chamber
A drop of about 22 blocks brings most common mobs (zombies, skeletons, creepers, spiders) to near-death without killing them, so a single hit finishes them and you get the XP. Too short and kills are slow; too long and fall damage kills them and you get no XP.
4. The kill chamber and AFK spot
Mobs land in a 1-block trench behind a half-block gap. You stand at the kill spot with a Looting sword and one-hit each mob. Hoppers under the trench feed gunpowder, bones, string, and arrows into chests, so the grinder is a drop farm as well as an XP farm.
Stand outside the 24-block no-spawn radius but inside the 128-block despawn sphere and within simulation distance. Too close and spawning pauses; too far and mobs despawn. The Mob Spawner Optimizer shows exactly which blocks are spawn-eligible from your AFK point.
Why a gold farm is the better midgame XP source
Once you can reach the nether roof, a gold farm becomes one of the best XP rates in the game, because every single kill is a player kill and zombified piglins spawn at any light level in huge numbers. Many players build a gold farm primarily for enchanting XP, with the gold as a bonus. If you are choosing one farm to carry you from early to late game, it is the gold farm.
AFK placement and chunk loading
Every spawning XP farm only runs while its chunks are loaded and ticking. Stay in simulation distance, and for passive operation force-load the chunks:
/forceload add <farm-x> <farm-z>
You need ENTITY_TICKING level (what /forceload provides). See the chunk borders and forceload guide for why lower ticket levels are not enough.
Rates: what actually drives output
XP-per-hour numbers copied from videos are meaningless because they depend entirely on your build. What determines your rate:
- Spawnable surface in range. More dark platform (or more piglin platform) inside the 24-128 sphere fills the mob cap faster.
- No competing spawns. Every un-proofed surface in range steals spawns. Light or slab everything that is not a platform.
- Kill throughput. If mobs pile up faster than you kill them, the cap fills and spawning stalls. A fall height that leaves them one-hittable keeps kills fast.
- Looting level. Looting raises drop quantities (not XP), so it boosts the farm's side output.
Build it, AFK for a measured ten minutes, and multiply. That number is real for your farm.
Server performance and why it matters
A mob XP farm at the cap means dozens of entities spawning, pathing, falling, and dying every second, plus items and hoppers. On a server, several players each running farms multiplies the load and drops TPS.
Size your server for the entity load with the Server RAM Calculator, and pick a host on real high-entity performance with the hosting comparison. If a single-player world chugs near the farm, the lag and stutter guide covers the settings that help most.
Common mistakes
No XP from kills. The farm is killing mobs with fall damage instead of the player. Shorten the fall so mobs survive the drop, and land the final hit yourself.
Slow or stalled spawning. Either you are inside the 24-block no-spawn radius, or spawns leak onto un-darkened or un-proofed surfaces in range. Move back and spawn-proof everything that is not a platform.
Mobs reaching the player. A gap in the kill trench, often the drop hole. Seal every approach.
Farm stops when you move. The chunks left simulation distance. Force-load them and stay in range. Review render vs simulation distance if mobs vanish when you back away.
Related farms
The dark-room grinder is the foundation; the general mob farm teaches the spawning rules in full. For higher XP, build a gold farm. A mob switch suppresses spawns elsewhere so your active farm claims the whole cap.
This guide is part of our Minecraft farm guides collection for 26.2.
Frequently asked questions
What is the best XP farm in Minecraft 26.2?
For most players a gold farm on the nether roof gives the best XP rate, because every kill is a player kill and zombified piglins spawn in huge numbers. Early game, a dark-room mob grinder or a found dungeon spawner is the easiest start; late game, an enderman farm gives the highest raw XP.
Why does my XP farm give no experience?
XP-bearing mobs only drop experience when a player lands the killing blow. If fall damage, lava, or suffocation is killing the mobs, you get the drops but no XP. Shorten the fall so mobs survive to be one-hit by you.
How tall should the fall be in an XP farm?
About 22 blocks for common overworld mobs and zombified piglins. That brings most to near-death so a single hit finishes them, without fall damage killing them outright and costing you the XP.
Is a dark-room or gold farm better for XP?
A gold farm produces more XP per hour and runs at any light level, but needs nether-roof access. A dark-room grinder is easier to build early and also drops gunpowder, bones, string, and arrows. Start with the dark room, upgrade to gold.
Do XP farms work while I am away?
Only while the chunks are loaded and ticking. Force-load the farm's chunks with /forceload for ENTITY_TICKING level, and note that mob spawning still needs a player in the dimension in most setups.
Sources & further reading:







