Tools

Maze Generator

Printable mazes from easy to expert

Play on screen: drag from the green dot, or use the arrow keys.

How to make a printable maze

  1. Choose a size, from an easy 8 × 8 maze for young children to a 40 × 40 expert maze.
  2. Choose a style: long winding paths, or a maze with many short dead-end branches.
  3. Play on screen by dragging from the green start dot or using the arrow keys, or print it or download a PNG. Tick Show solution to see the way through, and print again for an answer sheet.

How the mazes are made

Every maze is "perfect": there is exactly one path between any two points, with no loops and no unreachable areas, so there is always a single solution from the green start to the red finish. The winding style uses a depth-first search, which carves long corridors and produces challenging mazes with few, long dead ends. The branching style uses a randomised version of Prim's algorithm, which grows the maze outwards and creates many short dead ends that look easy but are tricky to read. The solution is found with a breadth-first search.

Mazes are great for developing pencil control, planning and patience in young children, and for quiet time on journeys or in waiting rooms. They also make a handy way to explore algorithms with older students: compare how the two styles look and why. Each press of New maze creates a completely new one in your browser.

Does every maze have a solution?

Yes. Each maze has exactly one path from start to finish.

Which size suits young children?

8 × 8 for ages 4–6 and 15 × 15 for ages 7–10. Print large for little hands.

Can I play on a phone?

Yes. Drag your finger from the green dot along the corridors.