Fence

Fences are wall blocks that cannot normally be jumped over.

Natural generation
Oak fences spawn naturally:
 * As the uprights for the supports in regular mineshafts, where they are plentiful.
 * In library rooms of strongholds as railings and chandeliers. In the latter case, there are many torches attached to them.
 * In plains villages.
 * In woodland mansions.
 * In shipwrecks.

Spruce fences spawn naturally:
 * In swamp huts.
 * In taiga and snowy tundra villages, where they appear in tables, animal pen, butcher and shepherd houses, lantern lamp post, and other buildings.
 * In shipwrecks

Birch fences generate naturally:
 * In woodland mansions.
 * In shipwrecks.

Jungle fences generate naturally:
 * In desert village armorer houses as window.
 * In shipwrecks.

Acacia fences generate naturally:
 * In savanna villages, where they appear in tables, animal pen, butcher and shepherd house, stilt house buildings, and other building.
 * In shipwrecks.

Dark oak fences generate naturally:
 * In badlands mineshafts, as the supports.
 * In pillager outposts, as part of watchtower, tent, cage, and scarecrow.
 * In woodland mansions.
 * In shipwrecks

Nether brick fences generate naturally:
 * in nether fortresses, where they form window bars, balcony fencing, and gate-like structures.

Obtaining
Wood fences are broken most quickly with an axe, but drop when broken with any tool. Nether brick fences require a pickaxe; mining it with anything else destroys it and drops nothing.

Barrier
While fences appear to be a single block tall, and have a hitbox height of one block, their collision box (for entities) is 1.5 blocks tall, meaning most mobs cannot jump over them without the Jump Boost status effect. They are transparent to light and have visual gaps in the model.

A fence occupies the center space of blocks and automatically connects to any solid block that is placed next to it. Wood fences connect to other wood fences, but do not connect to nether brick fences.

Leads
Fences can be used to attach mobs with a lead.

Fuel
Wooden fences can be used as a fuel in furnaces, smelting 1.5 items per block.

Sounds
Java Edition:

Bedrock Edition:

ID
Java Edition:

Bedrock Edition:

Block data
In Bedrock Edition, fences use the following data values:

Trivia

 * If a carpet is placed on top of a fence, a player can jump onto the carpet, while mobs cannot (except rabbits).
 * Getting hit by someone else (or shooting yourself with a Punch enchanted bow while sprinting forward) while in midair can cause the knockback to propel you over a fence you would not be able to jump over normally.
 * Placing a carpet on top of a fence does not reduce the fence or wall collision box down to one block, it just provides a platform one block high around the fence/wall to make it easier for climbing on the top of the fence.
 * Projectiles get stuck in the collision box of the fence and remain there if shot from upward.