The basic fence recipe and what you need
A fence in Minecraft is a block that connects to adjacent fences and walls, creating a barrier that mobs and players cannot jump over. To craft one, you need six wooden planks arranged in a specific pattern: place planks in the top and bottom rows of your crafting grid (three on top, three on bottom), leaving the middle row empty. This gives you three fence blocks per craft.
You can use any type of wooden plank — oak, spruce, birch, jungle, acacia, dark oak, mangrove, or cherry — and they all work the same way. If you mix plank types in a single recipe, the fence will still craft, but the result will be the plank type of whichever wood you placed first. Most players stick to one type per fence for a consistent look.
The planks themselves come from logs. Chop down a tree with your axe (or any tool, though an axe is fastest), then open your inventory and place each log in a crafting square to turn it into four planks. One log gives you four planks, so you need at least two logs to gather enough planks for a single fence recipe.
Key Takeaways
- Fences require six wooden planks in a specific pattern: three on top, three on bottom, with the middle row empty in your crafting grid.
- You can craft fences from any wood type, but mixing types in one recipe will make the fence match whichever plank you placed first.
- Fences connect automatically to adjacent fences, walls, and certain blocks like fence gates, creating a continuous barrier without gaps.
- Fences are one block tall but prevent mobs and players from jumping over them because the game treats them as 1.5 blocks high for collision purposes.
- Fence gates are crafted separately (four planks plus two sticks) and swing open to let you pass through without breaking the fence.
How fences connect to each other and nearby blocks
When you place a fence next to another fence, they connect automatically. You do not have to do anything — the game sees the adjacent fence and links them together visually. This works in all four horizontal directions (north, south, east, west) but not vertically. A fence placed on top of another fence sits as a separate block and does not connect.
Fences also connect to fence gates, walls, and certain solid blocks. If you place a fence next to a wooden wall or a fence gate, they will link up and form a seamless barrier. This is useful for creating gates in your fence line without leaving gaps. However, fences do not connect to glass, leaves, or transparent blocks, so you will see a gap if you try to use those as part of your fence.
The connection happens only on the sides where another compatible block exists. If you place a single fence in open space, it stands alone with no arms extending outward. As soon as you add a fence next to it, both fences grow connection arms toward each other. This means you can build complex fence patterns by controlling which blocks you place adjacent to each fence.
Building a straightforward enclosure or pen
To build a basic enclosure, decide on your shape and size. A straightforward square pen might be 10 blocks by 10 blocks. Mark out your corners with temporary blocks (dirt works fine), then place fences along each side, connecting them as you go. The fences will automatically link to each other at corners and along straight lines.
For a 10-by-10 pen, you need 40 fence blocks total (10 on each of four sides, minus the four corners which are counted once). Craft your fences in batches — each recipe gives you three, so you will need about 14 recipes to have enough. Place them in a continuous line, and they will form a connected barrier.
If you want to enter and exit the pen, you will need a fence gate. Place the gate in one of your fence lines by removing a fence block and putting the gate in its place. The gate connects to the fences on either side of it automatically. Right-click the gate to open and close it. You can place multiple gates if you need more entry points.
Adding height and creating multi-level fences
A single fence is one block tall, but the game treats it as 1.5 blocks high for jumping purposes. This means mobs and players cannot jump over it, even though it looks shorter than a full block. If you want a fence that looks taller, you can stack fences on top of each other.
To stack fences, place a fence block, then place another fence block directly on top of it. The upper fence will sit on the lower fence and connect to it. You can continue stacking up to the height you want. A two-high fence looks like a solid wall and is much harder to escape from. Three-high fences are nearly impossible to jump over without a sprint-jump from a high point.
Stacking fences is useful for animal pens where you want to prevent escape, or for decorative walls around your base. Keep in mind that stacked fences use more materials — a 10-by-10 pen that is two fences high requires 80 fence blocks instead of 40.
Decorating and customizing your fence design
Fences come in eight wood types, each with a different color and texture. Oak fences are the most common and neutral. Spruce fences are dark and work well in snowy or forest biomes. Birch fences are light and bright. Jungle, acacia, dark oak, mangrove, and cherry fences each have their own aesthetic and match their corresponding wood blocks.
You can mix fence types in the same structure by placing different types next to each other. They will not connect across the boundary between types, so you will see a small gap, but this can be a deliberate design choice. Some players use this to create striped or patterned fences.
Fence posts are often decorated with blocks on top. Placing a fence post and then a lantern, torch, or decorative block on top of it creates a fence with a light source or visual interest. You can also attach signs to fences by right-clicking the fence with a sign in your hand. This is useful for labeling animal pens or marking property boundaries.
Fence gates and how to use them
A fence gate is crafted with four wooden planks and two sticks. Arrange them in a 2-by-2 square with the sticks in the middle column and planks filling the rest. This gives you one gate per recipe. Gates are placed in a fence line just like a fence block — remove a fence and put the gate in its place.
Right-click a gate to open it. The gate swings outward and you can walk through. Right-click again to close it. Gates connect to fences on both sides automatically, so there is no gap. You can place gates on both sides of a fence line if you want to control traffic from multiple directions.
Gates are useful for animal pens because they let you enter without breaking the fence, and they close automatically so animals cannot escape when you open them. They are also decorative — many players use gates as part of their fence design even when they do not need a functional door.
Common mistakes and how to avoid them
The most common mistake is forgetting that fences do not connect vertically. If you stack fences, the upper fence sits on top of the lower one but they do not visually merge. This is not a problem — it is how the game works — but it can look odd if you are expecting a seamless wall.
Another mistake is mixing wood types and expecting them to connect. Fences only connect to other fences of the same type, walls of the same type, and gates of the same type. If you place an oak fence next to a spruce fence, they will not link. Plan your fence type before you start building.
Players also sometimes forget that fences need a crafting grid, not a furnace. You cannot smelt planks into fences — you must use a crafting table or your inventory crafting grid. If you are far from a crafting table, open your inventory and craft there instead.
Frequently Asked Questions
Can I use fence gates without building a full fence?
Yes. A single gate can stand alone in open space, and it will function normally — you can open and close it. However, gates are designed to work as part of a fence line, so a standalone gate looks odd. Most players use gates as part of a larger fence structure.
Do fences stop water and lava from flowing?
No. Water and lava flow through fences as if they were not there. If you need to contain liquids, use solid blocks like wood or stone instead. Fences are only useful for stopping mobs and players.
What is the difference between a fence and a wall?
Walls are shorter and wider than fences, and they connect differently. Walls connect to adjacent walls and some solid blocks, but not to fences. Walls are often used for decorative purposes or for building structures that look more like actual walls. Fences are taller relative to their width and are better for containing mobs.
Can I paint or dye a fence a different color?
No. Fences take their color from the wood type you use. You cannot dye them or change their appearance with paint. If you want a different color, you must craft fences from a different wood type.
How do I remove a fence without breaking it?
Left-click a fence to break it. It will drop as an item that you can pick up and place elsewhere. Breaking a fence does not damage adjacent fences — they remain in place. If you want to remove a section of fence, break each block individually.