Printables / Puzzles
Maze Generator
Generate printable mazes from very easy to expert, each with exactly one route from start to finish, and print the solution on a separate sheet.
Maze Generator: Each maze is grown by a randomised depth-first search, which carves passages from the start, wandering until it reaches a dead end and backing up to try new branches until every square has been visited. That produces a perfect maze: every square is reachable and there is exactly one path between any two. The solution is found by a breadth-first search. Runs 100% locally in your browser with zero server file uploads.
- Category
- School & study tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
Maze
Maze · Answers
Each maze is a perfect maze: there is exactly one path between any two points, so exactly one way from the start at the top left to the exit at the bottom right.
Mazes and young children
Mazes build pencil control, planning, and patience: a child has to look ahead, notice dead ends, and keep the pencil between the walls. Start with very easy mazes and wide passages, and let children trace with a finger before using a pencil.
For older children, time each other, or ask them to find the route without touching the page. Graph paper from the graph paper page is good for drawing their own mazes.
How computers make mazes
The depth-first method used here makes long, winding corridors with relatively few branches, which suit puzzles. Other algorithms, such as Kruskal's or Prim's, produce more, shorter dead ends and a different feel; all of them make perfect mazes when they connect every square without loops.
How to use it
- Pick a size, from very easy for young children to expert.
- Press New maze until you like it.
- Print the maze, and print the solution if you need it.
Privacy & limitations
Mazes are generated in your browser.
Related tools
Frequently asked questions
Which size suits which age?
As a rough guide, very easy (8 squares across) suits ages 3 to 5, easy and medium ages 5 to 8, and hard and above older children and adults. Children vary, so try a size and adjust.
What is a perfect maze?
A maze with no loops and no closed-off areas: there is exactly one path between any two points. It cannot be solved by luck alone, and following one wall always works in it.
How does the wall-follower trick work?
Keep one hand on the same wall from the entrance and you will eventually reach the exit of any perfect maze, though not by the shortest path.
Will it print on one page?
Yes, on A4 or Letter. Larger sizes use narrower passages; expert mazes are best printed at full size.
Free tool · runs in your browser · no account required