The easiest Minecraft XP farm to build is a dungeon spawner trap: you find a monster spawner, dig out the space around it, wash the mobs it spawns toward one spot with water, and finish them yourself. For raw speed, the Minecraft Wiki's experience-farming tutorial points to enderman, gold and guardian farms instead.
One rule shapes every design: mobs only drop XP if a player, or a player's tamed wolf, killed them. Cactus, lava and drowning kills give you nothing. Everything below is current as of Java 26.3, per the Minecraft Wiki, which we checked on November 9, 2026. We did not read the 26.4 snapshot notes.
Which XP farm should you build?
The wiki lists XP per kill for each mob. A mob's XP value is the real measure of a farm: how many of that mob you can kill, times what each one gives. We've left out per-hour rates because the only figures available come from an undated, work-in-progress wiki page that doesn't say which designs it measured.
| Farm | XP per kill (Java) | Honest take |
|---|---|---|
| Zombie or skeleton spawner | 5 each | Easiest to build. Needs a dungeon spawner. Zombie spawners also give gear you can disenchant at a grindstone (wiki). |
| General mob farm | 5 for most hostile mobs | No spawner needed, but the wiki says it is "not usually a great source of XP". |
| Enderman farm | 5 | One of the wiki's speed picks. Built at y=1 in the End, with void risk. |
| Gold farm (zombified piglins) | 5, plus 1-3 per piece of equipment | Also produces gold. Java designs use magma blocks as the spawning platform. |
| Guardian farm | 10 | Wiki-described as very fast. Also gives prismarine. |
| Blaze spawner | 10 | Blaze rods as a bonus. Needs a Nether fortress. |
| Silverfish spawner | 5 | Only in a stronghold's portal room, and silverfish drop no items. |
For a first farm, build the spawner trap. For raw speed once you have a stack of gear, read our enderman farm guide or gold farm guide. If you want XP without a spawner, the mob farm guide covers the general design.
Farms that aren't XP farms, and non-farm options
- Iron farms don't help. Iron golems drop no XP.
- Smelting gives XP per item. Cactus is 64 XP per stack on Java, but only 12.8 on Bedrock.
- Villager trading gives about 4.5 XP per trade on average, and the wiki calls it "not a permanent source of XP".
- Fishing gives 1-6 XP per catch. The wiki treats it as a slow source, though some players on r/Minecraft prefer it anyway.
- Bottles o' enchanting give 3-11 XP each.
How much XP is level 30?
Reaching level 30 takes 1,395 XP from level 0, and it's the top level an enchanting table uses. At 5 XP per mob, that is 279 kills. The cost per level rises as you go:
- Levels 0-15: going from level L to L+1 costs
2L + 7XP. - Levels 16-30: it costs
5L - 38XP. - Level 31 and up: it costs
9L - 158XP.
| Level | Total XP from level 0 |
|---|---|
| 10 | 160 |
| 20 | 550 |
| 30 | 1,395 |
| 40 | 2,920 |
| 50 | 5,345 |
Going from level 27 to 30 costs 306 XP. XP orbs vanish after five minutes and drift toward you from 7.25 blocks away, so keep your collection point close. If you die, you drop 7 × your level in XP, capped at 100 points, unless keep_inventory is on.
XP farms and Mending
Mending repairs gear at 2 durability per XP point, but it takes the XP first. The wiki says experience won't go to your level bar while any Mending item you hold or wear can still repair. A farm therefore feeds damaged Mending gear before it feeds your levels. Since 1.16, Mending only picks damaged items. To bank levels, take the damaged gear off. To repair gear, stand in the farm wearing it. Our guide to getting Mending fast covers the book itself.
How to build a spawner XP farm
This follows the Minecraft Wiki's "Simple farms" steps from its spawner trap tutorial, then its "Flow trap" layout, which brings water to a collection point where you finish the mobs by hand. Spawners can't be obtained in survival and pistons can't move them, so you build around one you find. Dungeon spawners are zombie 50%, skeleton 25% and spider 25%. Zombies are the easy ones. Skeletons are the trickiest to contain.
Step 1: Know the spawner's rules
- It activates when a player is within 16 blocks of its centre, measured at your feet.
- It spawns in a volume up to 9×3×9 around the block, trying 4 mobs per cycle, then waits 10 to 39.95 seconds.
- If 6 or more of its mobs are inside a 9×9×9 volume on Java, it skips the cycle. Uncollected mobs choke your output.
- Two spawners of the same type close together share that check and cut each other's output.
Step 2: The simple farm
- Secure and light the area while you work.
- Clear out any chests.
- Dig out the entire spawning range, 9×9×5 centred on the spawner. Mobs only spawn where their body fits, so clear it all to air. The wiki also recommends digging 5 more blocks under it, so non-spider mobs drop out of the spawner's detection range.
- Wall the farm in everywhere except the front.
- Build the front for your mob. For zombies, a gated fence is enough. For skeletons, put fences or gates at eye level so they can't shoot you, with an open row below to hit them.
- Add a flood system at the back. If you've opened the full area under the spawner, three water source blocks at the back make a sheet of water that washes mobs and drops toward the front.
- Remove all the light sources. A single torch on the spawner is enough to shut down a dark-only spawner's whole volume.
- Attack from the front. Keep a bow and arrows handy, because creepers can spawn in the dark room.
Step 3: The flow trap variant
The wiki highly recommends its flow trap as effective and safe on all mobs except blazes. Build a 10×10 room around the spawner. Put water on every block along one side. Dig a one-block-deep trench on the opposite side, with the holes next to the water, then remove the torches. Water carries the mobs to the trench, and you hit or shoot them there. The wiki says you can run it for hours in one go for a lot of levels, at minimal risk. It gives no dimensions for the trench beyond the 10×10 room.
Because you finish the mobs by hand, they die to your hit and drop XP. The wiki notes that tamed wolves also earn you XP. They attack skeletons automatically, but they have low health, so you need several.
What about the 22-block drop?
The wiki also lists a pit trap: a 22-block fall leaves mobs on half a heart for a one-hit kill. It warns that the pit takes a long time to build and only works for spawners near or above the surface. Its detailed pit-and-water design, which lifts mobs with a water elevator, is marked as broken since 1.13, because zombies and skeletons no longer swim. The flow trap needs no fall.
Why isn't my XP farm working?
- The spawner isn't spawning. You may be farther than 16 blocks away, measured at your feet. A torch or other light is in the room, or the game is on Peaceful (spawners still activate on Peaceful but spawn no monsters).
- It spawned, then stopped. Six or more mobs are inside the 9×9×9 volume. Clear them faster.
- Mobs spawn but you get no XP. They died without a player hit. A mob has to die within five seconds of a player or tamed-wolf hit. A fall after a hit still counts inside that window.
- Zombies break through. Zombie spawners can produce baby zombies, which are only one block tall, and zombies can call for reinforcements on Java. Make the walls tight.
- Mobs are despawning. Per the wiki, monsters despawn unless they are marked persistent. On Java, a mob with no player within 32 blocks for 30 seconds has a 1 in 800 chance of despawning every game tick, and a mob with no player within 128 blocks despawns immediately. Hurting a mob resets its inactivity clock, so a mob you hit but don't kill starts its despawn clock over. On Peaceful, most monsters despawn wherever you are. Our reading, not a wiki statement: while you stand at the farm, you are always close enough that the 32-block rule doesn't apply, and walking away switches the spawner off at 16 blocks anyway. The wiki doesn't say whether spawner mobs are persistent, so we make no claim either way.
Mining the spawner itself drops 15-43 XP, but you lose the farm.
Java versus Bedrock
This is a Java guide. On Bedrock, the spawner's horizontal range is a diamond rather than a square, the mob-cap volume is 16×10×16, and some XP values differ.