How to solve a maze: wall following and dead-end filling
Two dependable ways to solve a paper maze, why keeping a hand on the wall works, and how filling in dead ends reveals the only route.
On this page
A maze on paper can be solved by trial and error, but two simple methods always work on the kind of maze most puzzle books print. One is a rule you could follow with your eyes closed. The other turns the maze into a colouring job. Both are worth knowing, and both are easy to practise on a sheet from the maze maker.
What kind of maze is this?
Many printed mazes, including Paperoom's, are perfect mazes. Every part of the maze can be reached, and between any two points there is exactly one route, so there are no loops and no sealed-off rooms. The walls form one connected piece that touches the outside border.
These facts are what make the two methods below dependable. A maze with loops or islands of wall can still be solved, but it needs more care, and the wall-following rule can send you round in circles.
Method 1: keep a hand on the wall
Put your pencil in the entrance and imagine resting your right hand on the wall beside you. Now walk without ever lifting that hand. At each junction, take the turn that keeps your hand on the wall: turn right if you can, otherwise go straight, otherwise turn left, and if you meet a dead end, turn around.
In a perfect maze this always reaches the exit. Because the walls are all connected to the border, following one wall is like tracing the outline of a single shape, and the exit is a gap somewhere on that outline.
The rule is reliable but not short. You will walk into dead ends and back out again, and in a big maze that can take a while. It also works with the left hand, as long as you never switch hands halfway.
Method 2: fill the dead ends
The second method looks at the whole maze at once. Find every dead end, a short corridor closed on three sides, and shade it in up to the junction where it meets the rest of the maze. Shading a dead end can create new dead ends, so keep going until there are none left except the entrance and the exit.
What remains unshaded is the route. In a perfect maze it is the only one.
This method suits people who like to see the whole puzzle. It is also a good way to solve a maze together: one person shades from the top while another works from the bottom.
Other habits that help
- Look at the exit first. Working backwards from the finish, or from both ends at once, often shows which half of the maze matters.
- Use the eraser rarely. Light pencil lines let you back out of a wrong turn without rubbing a hole in the paper.
- For young children, a highlighter on a small maze makes the route easy to see and to talk about.
- When two of you race, give both the same maze. Paperoom's repeatable seed prints the same maze again whenever you need a second copy.
Winding and branching mazes
The shape of a maze depends on how it was made. Paperoom's winding style is carved with a depth-first search, which tends to make long corridors with few junctions. That suits wall following, because there are fewer side trips. The branching style uses Prim's method, which leaves many short dead ends. That suits dead-end filling, because each dead end is quick to shade.
Tip: Try both methods on the same sheet. Print a maze twice with the same seed, then race: one player follows the wall and the other fills dead ends.
Every Paperoom maze comes with an answer page where the route is drawn in colour, from small grids for young children up to huge mazes that take a long, quiet while.


