Tutorials/Iron golem farming

Iron golem farming uses village mechanics to produce iron, as well as byproducts such as poppies and string. Usually, an iron golem farm is a player-constructed village in which golems are spawned and then either killed immediately, or moved to a holding cell outside the village boundary for later killing. Iron golem farming is preferable to other methods of iron farming from zombies and skeletons due to giving a much higher quantity of iron.

Overall spawning requirements
An iron golem needs an available volume in which to spawn. There must be at least 3 transparent blocks (preferably air, not other transparent blocks like glass) above the spawning surface, which must be solid and flat (but not a slab).

Java Edition
In Java Edition, a villager may attempt to spawn an iron golem after "gossiping" to 5 other villagers. The villagers must have access to their workspace and have slept before the golem will spawn, however.

Iron golems can spawn when non-nitwit villagers who have slept in beds gossip five times about needing a golem at a gathering point, and four other villagers are within 80 blocks. Once these conditions are met, an iron golem can spawn in a 16×6×16 area centered on the location of the villager who spread the gossip.

Bedrock Edition
In Bedrock Edition, villagers are not required to sleep or have a workstation in order to spawn iron golems. For an iron golem to spawn, the following conditions must be met: The spawn rate doesn't appear to be affected significantly by increasing the number of beds or villagers.
 * The village has at least 21 beds
 * The village has at least 10 non-nitwit villagers, each of whom has claimed a bed

An iron golem needs a solid flat surface on which to spawn, with at least three transparent blocks above. The spawn surface can exist between 3 blocks below a bed to even with a bed. The feet of the iron golem will spawn on that surface (although in 1.11 there is a bug that sometimes causes golems to spawn stuck in the ground with its head visible above ground).
 * Vertical spawn volume

If beds are placed 3 or more blocks above ground, iron golems cannot spawn on the ground; a spawning surface is needed within the 4-block vertical extent of the spawning region.

Iron golems can spawn on a valid surface extending 8 blocks in any direction from any bed.
 * Horizontal spawn volume

In Bedrock Edition 1.11, the probability isn't uniform around the beds. Only 10% of the iron golems will spawn toward one direction. The other 90% will spawn in all other directions, with about 70% of the spawns in a corner quadrant.

Legacy Console Edition
Iron golem farms in Legacy Console Edition (as well as Java and Bedrock before the Village & Pillage update), are based on doors. Iron golems spawn in a 16×6×16 volume centered on the geometric center of at least 21 doors with at least 10 villagers nearby.

Java Edition videos

 * WeirdWilliam's Iron Farm 1.14


 * DocM's Iron Farm

Bedrock Edition videos
These videos describe working farms, but do not accurately represent the iron golem spawning mechanics as they exist in Bedrock Edition 1.11.