Skip to content
Minecraft

How to build an XP farm in Minecraft

Published on 5 October 2026

The easiest Minecraft XP farm is built around a monster spawner for zombies or skeletons: water pushes the mobs to one spot, where you finish them off. Mobs only drop experience when you or your tamed wolf kill them, so the final blow has to be yours.

Below you’ll find the main types of XP farm, how to build a spawner farm and how to spend your levels wisely. Everything is checked against Java 26.3 and Bedrock 26.52.

Which XP farms are there?

Types of XP farm in Minecraft and what to know about each
FarmGood to know
Spawner farmBuilt around an underground monster spawner. Easy to build, but you do the hitting.
Mob farmA dark platform high in the sky. No spawner needed, but a big build.
Enderman farmIn the End, so only after the ender dragon. One of the fastest.
Gold farmZombified piglins in the Nether: experience and gold at once.
Guardian farmAt an ocean monument. Also very fast.
FurnacesSmelting gives experience too. Slow, but it runs by itself.

According to the Minecraft Wiki, a spawner farm takes about 24 minutes of grinding to get from level 0 to 30, while a good enderman farm does it in under a minute. Still, the spawner farm is the best place to start: you need no rare materials and you don’t have to go to the End yet.

The easiest farm for beginners

All you need is a monster spawner. You’ll find one in a dungeon: a small room with cobblestone walls and a floor full of mossy cobblestone, deep underground, usually with one or two chests. The spawner inside makes zombies (50% chance), skeletons or spiders (25% each).

Hear a group of one type of mob underground, or spot mossy cobblestone that isn’t next to lava, and there may be a spawner nearby. You can’t pick a spawner up, not even with Silk Touch, so you build the farm around it.

How to build a spawner farm

  1. Switch the spawner off. Zombies, skeletons and spiders only spawn in the dark, so one torch on the spawner stops it while you build.
  2. Make the room bigger. Dig out a 9 by 9 space around the spawner, with two layers below and two above it. That’s where the mobs appear.
  3. Add water. Place water in two corners at the back. It flows to the front and carries the mobs with it.
  4. Build your killing spot. Where the water meets, make an opening where you can hit the mobs but they can’t reach you. For zombies a fence with a gate is enough. Skeletons shoot through any gap, so put the fence at eye level and attack through the open row below it.
  5. Or let them fall. Lead the mobs into a shaft 22 blocks deep. Zombies and skeletons land with half a heart left, and one hit does it.
  6. Remove the torch and stay close. A spawner only works with a player within 16 blocks. It then tries to spawn four mobs every 10 to 40 seconds.

Once six mobs of its type are around, the spawner skips a round, so keep up the pace. A zombie or skeleton gives 5 experience points, plus 1 to 3 for each piece of gear it spawned with.

How to spend your levels wisely

  • Enchant at level 30. The best option on an enchanting table needs level 30, but only costs you 3 levels and 3 lapis lazuli. For that you need fifteen bookshelves around the table.
  • Don’t hoard endlessly. Each level costs more experience than the last: going from 27 to 30 already takes 306 points, and 0 to 30 takes 1,395 in total.
  • Watch out when you die. You drop at most 100 experience points (7 per level) and lose the rest. Spend your levels before doing anything risky, or turn on keep inventory.
  • Use Mending. With this enchantment, experience repairs your gear: each point restores 2 durability. That turns your XP farm into a repair shop as well.
  • Mind the anvil. Combining and repairing works up to 39 levels. Beyond that the game says Too Expensive!

To see which enchantments are worth it, read the best Minecraft enchantments. Trading with villagers earns experience too, and a cleric sells bottles o’ enchanting, worth 3 to 11 points each.

Java vs Bedrock: what’s different?

  • In Java a spawner spawns mobs in a 9 by 9 square, in Bedrock in a diamond shape.
  • Java counts the six-mob limit in a 9-block cube around the spawner, Bedrock in a larger 16 by 10 by 16 area.
  • Smelting cactus gives 1 experience point per item in Java and only 0.2 in Bedrock.
  • Gold farms in Java usually use magma blocks, in Bedrock often nether portals.

Farms and server performance

On a server, an XP farm is a shared facility, but it does cost processing power: every mob and every item on the ground has to be tracked by the server.

  • Don’t let it pile up. A spawner stops at six mobs, a mob farm doesn’t. In Java, mobs crammed together more than 24 to a space take damage from the max_entity_cramming game rule, which can limit your output.
  • Clean up. Send loot through hoppers into chests. Experience orbs nobody picks up disappear after five minutes.
  • Know when it runs. A spawner only works with a player within 16 blocks, and the server only updates the area around players.
  • Measure it. If the server stutters, use Spark to see which farm is the heaviest.

More players and more farms mean more work for the server. Our guide on how much RAM a Minecraft server needs helps you size it. And an iron farm next door keeps you stocked with iron for all those hoppers.

Farming levels together? On your own Minecraft server the farm is there for everyone, even when you’re not online. See the Minecraft plans.

Frequently asked questions

What is the easiest XP farm in Minecraft?

A spawner farm around a zombie or skeleton spawner from a dungeon. Water pushes the mobs to one spot, where you finish them off.

Do automatic farms give XP?

Usually not. Mobs only drop experience when you or your tamed wolf kill them, or when they die within five seconds of a hit from you.

How much experience do you need for level 30?

1,395 points in total from level 0. Going from level 27 to 30 takes 306 points, because each level costs more than the one before.

Why isn’t my monster spawner spawning anything?

It’s probably too bright, there’s no player within 16 blocks, or six mobs of its type are already nearby. The mob also needs enough room to spawn.

Can you pick up a monster spawner?

Not in survival, not even with Silk Touch. Breaking it with a pickaxe does give 15 to 43 experience points, but then the spawner is gone.

More questions? See all frequently asked questions

Related articles