How-to GuidePublished 15 min read

How to Make a Maze: Drawing One by Hand, Making It Harder, Circular Mazes and the Right Size for Each Age

Your child asks you to make a maze, you start drawing lines on graph paper, and you end up with a maze full of dead ends whose answer is obvious at a glance, or one with no way to reach the goal at all. Instead of drawing walls as they come to you, build the maze with a fixed method: draw the solution path first, or start from a full grid and knock down walls one by one. Either way, anyone can make a maze that is always solvable. This guide covers how to draw a simple maze by hand, how to make a neat maze on graph paper, the five things that decide how hard a maze is (with figures counted cell by cell using a maze generator's code), maze sizes from age 3 to adults, how to make circular and heart-shaped mazes, how algorithms such as the recursive backtracker, binary-tree style methods and Prim's algorithm differ, when the right-hand rule stops working, and tips for printing mazes to hand out.

The short answer: draw the solution path first, or knock down walls in a grid

The most common reason homemade mazes go wrong is drawing the walls as they come to mind. If you start with the walls, you can block the route to the goal without noticing, or leave a straight run from the start that gives the answer away. There are two reliable ways to make a maze that can always be solved.

MethodHow it worksBest forResult
Draw the solution path firstDraw one path from start to goal, grow fake branches off it, then enclose everything with wallsHand-drawn mazes on blank paper, mazes for small children, mazes inside a pictureAny shape you like, but on a large maze the branches tend to bunch up
Knock down walls in a gridStart with every cell walled off, then remove walls between neighbouring cells one at a time to join themGraph paper, mazes for school-age children and adults, neat square mazesEvery cell is reachable and there is exactly one solution (a perfect maze)

Almost all computer-generated mazes use the second idea of knocking down walls. Even if you are drawing on paper, understanding it tells you why a maze feels easy and what to change to make it harder.

Drawing a simple maze by hand: solution path, then branches, then walls

On blank paper, starting from the solution path is the least error-prone approach. It also works for easy mazes for small children and for mazes hidden inside a drawing. Sketch in pencil, then trace the walls in pen at the end.

  1. 1

    Draw the outer border and choose start and goal

    Draw a square or round border and leave gaps for the entrance and exit. Put the start and goal as far apart as you can, such as top and bottom or opposite corners.

  2. 2

    Lightly draw the solution path

    In light pencil, draw one twisting path from start to goal. Don't head straight for the goal; wander out to the edges of the paper. The length of this path is the difficulty of your maze.

  3. 3

    Grow branches off the solution path

    Here and there along the solution, branch off fake paths that end in dead ends. Branching again from those fake paths makes the way back longer when someone takes a wrong turn, which makes the maze harder.

  4. 4

    Fill the empty areas with paths

    Any large blank area tells the solver they don't need to go there. Add paths so that one of the branches reaches into every empty space.

  5. 5

    Draw walls on both sides of the paths

    Finally, draw walls in pen along both sides of every path and erase the pencil. Keeping the path width even makes it look much more like a real maze.

The key is to place fake paths near the solution and right next to the start. If there is no fork just after the start, a child can simply keep going and never gets the fun of being lost. A long dead end just before the goal, on the other hand, keeps the solver on their toes until the very end.

Making a neat maze on graph paper: knock down walls one by one

For a large, proper maze, use graph paper and the wall-removal method. This is the recursive backtracker (depth-first search) from computer maze generation done by hand. It takes time, but you get a satisfying maze with dead ends and forks spread evenly across it.

  1. 1

    Mark out a grid the size of your maze

    With 1 cm graph paper you can fit roughly 18 × 25 cells on A4 (about 7 × 10 on letter paper with ½-inch squares). For a first try, 8×8 to 10×10 cells takes about 30 minutes. Imagine that every cell starts with walls on all sides.

  2. 2

    Start digging from any cell

    Pick a cell and mark it. Choose an unmarked neighbour, erase the wall between them (turning it into a passage) and move there. Mark that cell too.

  3. 3

    Keep digging until you are stuck

    Repeat. When every neighbour above, below, left and right is already marked, you are at a dead end.

  4. 4

    Back up and branch from a cell that still has room

    Retrace your path one cell at a time. When you reach a cell with an unmarked neighbour, start digging a new branch from there.

  5. 5

    Finish when every cell is marked

    Once you have backed all the way to the first cell, every cell is connected. Open an entrance in the top edge and an exit in the bottom edge of the border, trace only the walls in pen, and you are done.

Roll a die to choose the direction (1–2 up, 3–4 right and so on) so that your own habits don't show. When people choose, they tend to favour "straight on" and "right", and the passages all start to look alike.

A maze made this way is always a perfect maze. Because you only ever move into unmarked cells, no loops form, and in the end every cell is joined. Working on paper is slow, so when you want lots of mazes or very large ones, make and print them with the Maze Generator and enjoy hand-making as something to do together with your child.

Five things that decide how hard a maze is, compared with measured figures

The first thing most people try to make a maze harder is adding more cells. But mazes with the same number of cells can differ greatly in difficulty depending on how they are built. Difficulty comes mainly from these five things.

  • 1. Number of cells: simply more places to search
  • 2. Twistiness (length of the corridors): the longer the winding corridors, the later you realise you have taken a wrong turn
  • 3. Length of the solution: the longer the route to the goal, the more often you can go astray
  • 4. Loops: more than one solution, and places where keeping a hand on the wall no longer works
  • 5. Goal position: a goal inside the maze rather than on the border is harder to aim for from outside

To see the effect of item 2, we used the Maze Generator's code to make 200 square mazes of 16×16 cells (256 cells) at each twistiness setting and took the averages. Twistiness is the share of steps that continue from the most recently dug cell (the recursive backtracker); 0% means choosing a random dug cell every time, which is the same as Prim's algorithm.

TwistinessDead endsJunctionsSolution (top left → bottom right)Turns on the solutionSolution (to the farthest cell)
0% (Prim's)716334 cells (13% of all)1440 cells
25%696138 cells (15%)18—
50%585244 cells (17%)2457 cells
75%454155 cells (21%)32—
100% (backtracker)272683 cells (32%)49126 cells (49%)

A maze at 0% twistiness has 71 dead ends and looks very complicated. But most of those dead ends are only one or two cells long and can be spotted at a glance, so it is surprisingly easy to solve. The solution is short at 34 cells and runs almost directly to the goal.

At 100% (recursive backtracker) there are only 27 dead ends, but the solution grows 2.4 times longer to 83 cells with 49 turns. Each dead end is long, so once you go the wrong way you won't notice for a long time. Setting the goal to the farthest cell makes the solution 126 cells, about half the whole maze. This is the kind of maze people find hard.

Loops give more than one solution and break the right-hand rule

The best-known way to solve a maze is the right-hand (or left-hand) rule: keep one hand on the wall and keep walking. In a perfect maze where both start and goal are on the border, it always gets you to the goal, because all the walls are connected to the outer border in one piece, and following them eventually brings you out at the exit.

But if the maze has loops and the goal is inside, the walls around the goal can form an "island" not connected to the border, and the right-hand rule may just circle the outside of that island forever. Here is what happened when we made 300 mazes each of 16×16 cells at 65% twistiness and walked them from the start with the right-hand rule.

LoopsGoal at bottom-right exitGoal at farthest cellShortest route (farthest cell)
None (perfect maze)Reaches the goal 100%Reaches the goal 100%64 steps
Some (12% of dead ends joined into loops)Reaches the goal 100%92% (8% circle forever)57 steps
Many (30% of dead ends joined into loops)Reaches the goal 100%82% (18% circle forever)48 steps

Even when the right-hand rule works, the walk is far longer than the shortest route. In mazes with no loops and the goal at the bottom-right exit, a route that takes 49 steps at best took about 257 steps with the right-hand rule, because it goes into every dead end and back out.

More loops make the solution shorter (64 → 48 steps in the table above) and reduce dead ends. The maze still feels harder because it is difficult to notice you have come back to a place you already visited by a different route, so you end up going round in circles. Loops are great for adult mazes, but perfect mazes without loops suit small children better.

Maze size by age: start with 5×5 at age 3

In practice it is better to choose a maze size by whether a child can keep a pencil between the lines and follow the path ahead with their eyes, rather than by age alone. The table shows the Maze Generator's difficulty presets, averages from 200 square mazes made with each setting, and the approximate size of one cell when printed one maze per A4 page.

GuideCellsSolutionDead endsOne cell when printed one per A4 page
Ages 3–4 (Easy)5×5 (25 cells)About 10 cellsAbout 6About 2.5 cm (1 in)
Ages 5–6 (Normal)9×9 (81 cells)About 23 cellsAbout 18About 1.8 cm (0.7 in)
Primary school (Hard)16×16 (256 cells)About 50 cellsAbout 50About 1.1 cm (0.4 in)
Adults (For adults)30×30 (900 cells)About 107 cellsAbout 144About 6 mm
Extreme50×50 (2,500 cells)About 191 cellsAbout 329About 3.7 mm
  • Ages 3–4: with paths at least 2 cm wide, crayons and chunky pencils rarely stray over the lines. Trace with a finger first, then with a pencil
  • Ages 5–6: children start to follow the path ahead with their eyes even with more than 10 turns. Add answer pages and let them check their own work
  • Ages 8 and up: around 16×16 cells, children can avoid dead ends and decide where to back up. Setting the goal to the farthest cell adds a challenge
  • Adults: 30×30 cells or more. Two per A4 page makes each cell about 3 mm, so print large mazes one per page

If a child gives up halfway, try lowering the twistiness before reducing the number of cells. The solution gets shorter and the way to the goal is easier to see. If the aim is pencil-control practice, fewer cells, thicker lines and a maze close to a single path also work well.

How to make a circular maze: split the outer rings into more cells

A circular maze is made of concentric circles divided by radial lines into wedge-shaped cells. Usually you enter from the outside and head for the goal in the centre. The idea is the same as a square maze: remove the walls (arcs or radial lines) between neighbouring cells one at a time to join them up.

The tricky part when drawing by hand is that cells in the outer rings get stretched. If you divide every ring into the same number of cells (say, 8), the cells near the centre are small and the outer ones many times longer, so the paths vary in width. The fix is to double the number of cells per ring as you move outwards.

Ring (from the inside)Cells around the ringReasoning
Centre1The round cell that is the goal
1st6Divide the area around the centre into 6
2nd12Two cells for each cell on the inner ring
3rd–5th24Double the count when a cell becomes more than about twice as wide as the ring is thick
6th–11th48Same rule
12th–22nd96Same rule

The Maze Generator's circular mazes follow the same rule of doubling when a cell becomes about twice as wide as the ring. With 4 rings that gives 43 cells in total, 91 with 6 rings and 283 with 10 rings. To draw one by hand, use a compass to draw 4–6 evenly spaced circles, then a protractor to split the inner ring into 6 cells of 60°, the next into 12 of 30° and the next out into 24 of 15°. The cells come out about the same size.

How to make heart, star and diamond-shaped mazes

Heart or star mazes are made by laying the outline of the shape over a square grid and using only the cells inside it. Treat cells outside the shape as if they don't exist, knock down walls only among the cells inside, and you get a maze that follows the shape.

  1. 1

    Draw the outline on graph paper

    Draw the heart or star as large as you can. Drawing it across at least 16×16 cells keeps the narrow parts from disappearing.

  2. 2

    Use cells that are more than half inside

    Use only cells whose centre lies inside the outline. Redrawing the outline along the grid lines in steps makes the walls easier to draw later.

  3. 3

    Remove isolated cells

    Near the tips of a star or the dip of a heart you may get one or two cells that don't connect to the rest. Leave them out of the maze.

  4. 4

    Knock down walls among the remaining cells

    From here it is the same as a square maze. Put the start at the top cell and the goal at the bottom cell so the maze spans the whole shape.

Drawn across the same 16×16-cell area, a heart used about 174 cells, a diamond about 144 and a star about 110. In a star the paths run out into five pointed arms, so the dead ends feel long for the number of cells. For a Valentine's card or a birthday decoration, a heart of around 16×16 cells with thicker lines looks lovely.

Maze generation algorithms compared: recursive backtracker, binary-tree style, Prim's

Maze generation is a popular programming exercise, and there are several standard methods. All of them produce solvable mazes, but the character of the mazes they make is quite different.

MethodHow it worksWhat the mazes are like
Recursive backtracker (depth-first search)Dig from the current cell into an unvisited neighbour; when stuck, back up and branchLong winding corridors. Few dead ends, each one long. Hard for people to solve
Pole-toppling method (a binary-tree style method popular in Japan)Stand a pole at every other grid point and knock each one over in a random direction to make a wall (only the top row may fall upwards)Very easy to implement, but biased; the mazes tend to be regular and easy
Wall-extending methodGrow walls at random from the border or from points inside until they hit an existing wallMany short branches. Care is needed so walls don't close into loops
Prim's algorithmRepeatedly pick a random cell on the edge of the dug area and add itLots of short dead ends. Looks complex but is easy to solve
Kruskal's algorithmLook at walls in random order and remove a wall if the cells on either side are not yet connectedSimilar to Prim's. Short dead ends spread evenly
Growing Tree algorithmChoose the next cell from the list of dug cells: always the newest gives the backtracker, a random one gives Prim'sBy mixing the choices you can make anything between the backtracker and Prim's

The Maze Generator uses the Growing Tree algorithm, and its Twistiness setting changes how often it picks the newest cell: 100% gives the same mazes as the recursive backtracker and 0% the same as Prim's. Both make perfect mazes, so each maze starts with exactly one solution. Only when you ask for loops does it join some dead ends to a neighbouring cell. The answer shown is the shortest route from the start, found with breadth-first search.

If you are writing your own program, start with the recursive backtracker. All you need is a grid array and a stack that remembers the way back; written recursively it fits in about 20 lines. Large mazes can make recursion too deep, in which case switch to keeping the stack in an array.

How to check that your maze can be solved

A hand-drawn maze can turn out to have its route to the goal blocked even when it looks finished. Before giving it to anyone, check it in one of these ways.

  • Fill in dead ends: from the tip of each dead end, shade the path in pencil until you reach a junction. Repeat; the path left at the end is the solution. If nothing is left, the route is blocked somewhere
  • Follow the right-hand rule: in a maze without loops and with start and goal on the border, keeping your right hand on the wall always gets you to the goal. If it doesn't, a path is cut off
  • Ask someone else to solve it: you already know the answer, so you are likely to miss mistakes

Dead-end filling is also a handy way to find the answer. On a paper maze where you can see everything at once, the solution appears much faster than by walking from the start. If a child is stuck, "let's rub out the dead ends first" makes a good hint.

Tips for printing mazes to hand out

When you print mazes for home learning, a club, an after-school group or a kids' corner in a shop, these points make them easier to use.

  1. 1

    Print at 100% (actual size)

    "Fit to page" can shrink the page so the border gets cut off or thin walls fade. The Maze Generator's print page is laid out for A4 portrait with 10 mm margins, so print it at 100%.

  2. 2

    One large maze per page

    Putting two mazes of 30×30 cells or more on a page makes each cell about 3 mm, and pencil lines fill the paths.

  3. 3

    Thick lines for small children

    Bold lines make the difference between path and wall clear, so children notice when they go over the line. Bold lines also survive photocopying better than thin ones.

  4. 4

    Add answer pages and a name line

    When handing out many sheets, answer pages in the same order make checking easy, and a name line tells you whose sheet is whose when you collect them.

  5. 5

    Make it possible to print the same maze again

    In the Maze Generator, the same number and settings always give the same maze. Keep the URL or number and you can give the same maze to a child who lost theirs.

To play on a phone or tablet, use the Maze Generator's Play on screen mode and trace the passages with your finger to the goal. When you finish it shows your time, your number of steps and the fewest steps possible, so siblings and friends can race each other.

Common maze-making mistakes and how to fix them

Common mistakeCauseFix
The goal can't be reachedWalls were drawn first and blocked the route somewhereDraw the solution first, or rebuild with the wall-removal method
The answer is obviousNo forks near the start, or the solution is almost straightMake the solution wander to the edges and put a fork right after the start
Lots of dead ends but still easyAll the dead ends are only one or two cells longMake dead ends longer and branch again from them (raise the twistiness)
Unused empty areas stand outThe branches don't spread across the whole pageExtend branches into the gaps so paths run everywhere
Solvers go round in circlesA loop formed by accidentFor small children, add a wall to close one side of the loop. For adults, you can leave it
Lines are cut off when printedThe page was shrunk to fitPrint at 100% and put large mazes one per page

Making mazes is good exercise for the brain too. Planning the solution and deciding where to set traps is practice in imagining how the solver will think. Try making one each and swapping with your child, or copying a maze from the Maze Generator by hand, and enjoy the fun of making mazes as well as solving them.

FAQ

What is the easiest way to make a maze?
Lightly draw the solution path from start to goal first, grow a few branches off it that end in dead ends, and finally draw walls along both sides of the paths. If you start with the walls, it is easy to block the route and end up with an unsolvable maze.
How do you make a maze on graph paper?
Start with walls between every cell. From any cell, move into a neighbour you haven't visited yet, erasing the wall between them. When you can't move, back up along your path and start a new branch from a cell that still has an unvisited neighbour. When every cell is connected, open an entrance and an exit in the border.
How do I make a maze harder?
Besides adding cells, three things help: more long winding corridors (longer dead ends), a goal inside the maze, and a few loops. In 16×16 mazes, the long-corridor style had an average solution of 83 cells, 2.4 times longer than the short-branch style (34 cells).
What size maze is right for a 3 or 4-year-old?
About 5×5 cells with paths at least 2 cm wide. A solution of around 10 cells with 5 or 6 dead ends is plenty. Print one large maze per A4 page with bold lines so crayons stay inside the path.
How do you draw a circular maze?
Use a compass to draw evenly spaced concentric circles, then divide the rings into cells with radial lines. Give the outer rings more cells (6 around the centre, then 12, then 24 and so on) so the cells stay about the same size. Then erase walls between neighbouring cells one at a time to join the outside entrance to the centre.
Are there mazes the right-hand rule can't solve?
Yes. In a maze with loops and the goal inside, keeping a hand on the wall can leave you circling the same area forever. In our 16×16 test, with many loops and the goal inside the maze, the right-hand rule failed to reach the goal in about 18% of mazes.
What is the difference between the recursive backtracker and Prim's algorithm?
The recursive backtracker digs as far as it can from the current cell, giving long winding corridors. Prim's algorithm grows at random from the edge of the dug area, giving lots of short dead ends. People generally find backtracker mazes harder to solve.
How can I check that a maze I made can be solved?
Shade each dead end in pencil from its tip back to the nearest junction. Repeat until no dead ends are left; the remaining path is the solution. If nothing remains, the route is cut off somewhere.
Can I make and print maze worksheets for free?
With the Maze Generator you can make square, circular, heart, star and diamond mazes for free and print up to 20 at once on A4, with answer pages and a name line. You can also save them as PNG or SVG, or play by tracing with your finger on a phone.

Tools in this article

Related articles

How-to Guide15 min read

Breathing Techniques: How to Do 4-7-8, Box Breathing and Resonance Breathing (and Which to Choose)

A night when you can't fall asleep, the minutes before an exam or interview, a wave of irritation that won't settle. People tell you to “take a deep breath,” but how many seconds should you breathe in and out, and which technique should you use? This guide explains five common breathing techniques — 4-7-8 breathing, box breathing, resonance breathing, the physiological sigh and belly breathing — with exact timings, and compares them by breaths per minute and by the exhale-to-inhale ratio. It also covers why breathing calms you down, which technique to pick for sleep, nerves or anger, how to fix the problem when it feels uncomfortable, how to measure your resting breathing rate, and when not to do breathing exercises.

Read article →
How It Works16 min read

What Is the Zengin Format? How to Build Japanese Bulk and Payroll Transfer Files (120-Byte Layout)

When a company in Japan sends dozens of bank transfers at once through internet banking, the bank usually asks for a file in the Zengin format. The Zengin format is the transfer-data layout defined by the Japanese Bankers Association (Zengin-kyo): fixed-length text where every line is exactly 120 bytes, built from four record types — header, data, trailer and end. This guide covers the difference between bulk transfers (sogo furikomi), payroll and bonus transfers, every field and its byte position, the rules for writing payee names in half-width katakana and the corporate abbreviations カ) and (カ, how to convert Japan Post Bank account numbers, how to build the file from Excel or CSV, and what causes import errors — in the order people actually get stuck.

Read article →
How It Works15 min read

How to Calculate Gacha Odds: How Many Pulls Until You Get It, Pity, 50/50 and Max Copies

You assumed a 1% drop rate meant you'd get the unit within 100 pulls, but it never showed up. That isn't exceptionally bad luck: the chance of getting at least one copy from 100 pulls at 1% is only about 63% to begin with. This guide covers the formula for the chance of getting a unit in n pulls, a drop rate × pulls table, how many pulls it takes for half of players or 9 in 10 players to get it, the average and worst-case pulls with hard pity and a 50/50 rate-up with a guarantee, carried-over pity, how many pulls max copies (7) take, and how many blind boxes or random pin badges you need to complete a set, all with calculated numbers.

Read article →