Mob XP farm in Minecraft
Spawner farms and dark room mob farms: how to collect experience efficiently.
Experience (XP) is one of the most valuable currencies in Minecraft. You need it for enchanting items at the enchanting table and for repairing tools and armor on the anvil. Without a steady source of XP, advanced play gets incredibly slow and frustrating. That's why an XP farm should be one of the first automatic builds you make once you've mastered the survival basics.
Spawner farm: the easiest start
A spawner-based farm is by far the simplest and most accessible option for beginners. A spawner is a special block you can find in dungeons (small underground rooms with a spawner block in the middle), in mineshafts (cave spider spawners) and in Nether fortresses (blaze spawners). For an XP farm, zombie and skeleton spawners are the best, because they give you both experience and useful drops.
Building a spawner farm takes a few stages. First, expand the spawner room to at least 9x9x4 blocks (with the spawner in the center). Then place water along one side of the room so the flow pushes the mobs toward a central channel. The channel leads to a vertical shaft 22-23 blocks deep. That's the key number: after a fall from that height, mobs land with just half a heart of health, so you can kill them with one punch of your bare hand.
At the bottom of the shaft, you build a kill point: a narrow corridor (1x1 block) where you can see the mobs' legs. You hit them from below and collect the XP. Under the floor, you place hoppers connected to a chest, which automatically collect all the drops: rotten flesh, bones, arrows and now and then even armor and tools.
Tip: A spawner only activates when a player is within 16 blocks. Build your AFK spot within that range, ideally at the kill point. Light up the caves nearby to cut down on competing mob spawns and make the farm more efficient.
Dark room mob farm: a bigger scale
If you can't find a spawner, or you want more XP and drops, a dark room mob farm is the next step. The principle is simple: mobs spawn in the dark, so you build large, dark platforms high above the ground (ideally at Y=200 or higher), and a water or piston system pushes the mobs into a central hole, where they fall down to the kill point.
A typical dark room farm has 4-9 rooms of 8x8 blocks each, arranged around a central shaft. The floor is made of full blocks, not transparent ones: mobs don't spawn on glass or slabs. Every 20-30 seconds, water or piston systems kick in and push all the mobs into the central channel. From there, the mobs fall to the bottom, where you finish them off.
In the long run, a dark room farm has a clear advantage over a spawner farm. A spawner produces only one type of mob, while a dark room farm spawns zombies, skeletons, creepers, witches and spiders, which gives you a far bigger variety of drops. Creepers drop gunpowder, which you need to craft the firework rockets for flying with an elytra.
Building the farm high up (Y=200+) matters for one reason: mobs can only spawn in loaded chunks within 128 blocks of the player. The fewer caves and surfaces there are below the farm, the larger the share of spawns that ends up on the farm's platforms. You can read more about spawning mechanics in the chapter on farm optimization.
Enderman farm: the king of XP farms
An Enderman farm is without a doubt the best experience farm in the whole game. It produces 30-50 XP levels per minute, which makes it ideal for enchanting items quickly. You build it in the End, ideally on the outer End islands, far away from the main island with the Ender Dragon.
The mechanic is brilliant in its simplicity. Endermites (small bugs that sometimes appear when you throw an ender pearl) are natural enemies of endermen. You put an endermite on a pillar in the center of the platform, and endermen from all around run toward it and fall off the edge of the platform. At the bottom (22-23 blocks lower), they land at the kill point, where you finish them off.
Building one requires access to the End, which means defeating the Ender Dragon, so this is an endgame farm. You need: lots of building blocks (cobblestone or end stone), a named endermite (a name tag renamed at an anvil stops it from despawning), a rail, a minecart, and the patience to build a long bridge to the outer islands. It's worth it, though: once it's built, an Enderman farm solves your XP problem for good. Endermen also drop ender pearls, which are handy for teleporting and for crafting ender chests.
XP farms compared
| Farm type | XP per minute | Build difficulty | Extra drops |
|---|---|---|---|
| Spawner farm (zombie/skeleton) | 5-10 levels | Easy | Rotten flesh, bones, arrows, armor |
| Dark room mob farm | 10-20 levels | Medium | Gunpowder, bones, arrows, string |
| Enderman farm | 30-50 levels | Medium-hard | Ender pearls |
| Blaze farm (Nether) | 15-25 levels | Hard | Blaze rods (brewing) |
Using XP: what you need experience for
The main use of XP is enchanting items. An enchantment at level 30 (the maximum) requires 30 experience levels and 3 lapis lazuli. But levels aren't all equal: every level needs more XP than the one before, so reaching level 30 takes much longer than reaching level 10. That's why the best strategy is to enchant at level 30 rather than hoard hundreds of levels. After each enchant, the farm quickly tops up the levels you spent.
You also need XP to repair items on the anvil, combine enchanted books and rename items. The anvil uses up levels in proportion to how complex the operation is: repairing a netherite tool with lots of enchantments can cost 30 levels or more. Having an XP farm at hand makes these operations painless.
It's also worth mentioning the Fortune enchantment, which increases the drops from ores. To get it, you need XP to enchant a pickaxe. The Looting enchantment on a sword, in turn, increases mob drops, which makes your XP farm even more profitable. It's a great example of how farms and the enchanting system work together.
Tip: A spawner farm is the easiest way to get started with XP farms. Once you have access to the End, build an Enderman farm: 30+ levels per minute changes the game completely. You'll find more about the mobs you can farm in our mob encyclopedia.