Generate printable mazes for classrooms, puzzle books, kids’ activities or your own fun. Every maze is a perfect maze — there is exactly one path between any two points — so there is always a single clean route from the green start in the top-left to the red finish in the bottom-right, with no looping shortcuts.
How it works
The grid starts as a solid block of cells, each with four walls. The generator then runs the recursive backtracker (a randomised depth-first search): from the top-left cell it repeatedly knocks down the wall to a random unvisited neighbour, moves there, and when a cell has no unvisited neighbours it backtracks up the path it came from. Because every cell is visited exactly once and joined by a single removed wall, the result is mathematically guaranteed to be a perfect maze. The finished grid is drawn as crisp SVG vector lines.
Example
Choosing Medium builds a 16×16 grid (256 cells). The carving begins at cell (0,0), wanders through random neighbours, and backtracks at dead ends until all 256 cells are linked. The solver’s route runs from the green dot at the top-left to the red dot at the bottom-right.
| Size | Grid | Difficulty |
|---|---|---|
| Small | 10×10 | quick / kids |
| Medium | 16×16 | standard |
| Large | 24×24 | challenging |
Generate, then print or save as a PDF in your browser. Everything is generated and drawn locally — nothing is uploaded.