01 / Perfect
Always solvable
Every cell can be reached and there is exactly one path between any two, so the maze always has one answer.
Free tool
Pick a square or a round maze, a size and a way of building it, and a new maze appears. Every maze has exactly one way through, from an entrance to an exit you choose. Show the solution with a switch, see a rating of how hard it is, and use the seed to bring back the same maze later. Save a PDF with a page for each maze and an answer page, or save a PNG or SVG. It all happens in your browser.
Level
Seed
The same seed with the same settings gives the same maze. Type your own, or click New maze for a fresh one.
Look
The maze is made in your browser. Nothing is uploaded, and only your settings are kept in this browser for next time.
Made to print
01 / Perfect
Every cell can be reached and there is exactly one path between any two, so the maze always has one answer.
02 / Seed
The seed and settings rebuild the same maze on any device, and a link can carry them.
03 / Print
Sharp lines, a page for each maze, an answer page for each, on A4 or US Letter.
Guide
A maze generator builds a maze from a few choices: the shape, the size and the way it is carved. This one makes a perfect maze: every cell can be reached and there is exactly one route between any two cells, so there are no loops. It draws the maze as you change a setting, rates how hard it is, shows the solution on a switch and saves a printable PDF with an answer page.
All three start with a grid of cells with every wall in place and take walls down until every cell is joined. They differ in the order they do it, and that decides how the maze feels.
The rating counts wrong turns on the way from the entrance to the exit: at each cell on the solution, every opening besides the one you came in by and the one you leave by is a chance to go wrong. Fewer than 6 is Very easy, under 14 is Easy, under 32 is Medium, under 64 is Hard, and 64 or more is Very hard. That scale is our own and only a guide.
Here are averages over 60 seeds for 20 by 20 mazes from top to bottom:
| Built by | Wrong turns | Steps to solve | Dead ends | Usually rated |
|---|---|---|---|---|
| Recursive backtracker | 12.9 | 110.2 | 10.6% of cells | Easy |
| Prim | 29.5 | 37.6 | 32.2% of cells | Medium |
| Kruskal | 31.2 | 49.2 | 30.3% of cells | Medium |
The backtracker gives the longest walk but the fewest decisions, so it suits children who like to follow a path. Prim and Kruskal have a shorter way through with many more places to go wrong. Size matters too: at 50 by 50 the backtracker averages about 46 wrong turns and Kruskal about 92.
A maze is a spanning tree of its cells. Joining n cells with no loops and no cell left out takes exactly n minus 1 openings. A 20 by 20 maze has 400 cells and 399 openings. The generator checks that count, that every cell can be reached and that the entrance leads to the exit, on every maze it makes.
The seed is a short piece of text that drives the random choices. The same seed, shape, size, builder and entrance and exit always give the same maze, on any device. Change the size or the builder and the same seed gives a different maze. Copy link puts all the settings and the seed after a # in the address, so whoever opens it sees your maze, and nothing is sent to a server.
A round maze is built in rings. The middle is one cell, the next ring has 6, then 12, and a ring gets more cells as it gets wider so the cells stay about the same shape. Four rings make 43 cells and nine rings make 235. The usual finish is the centre. Across the outside puts two openings on the outer ring instead.
Save PDF draws the walls as lines, not as a picture, so they stay sharp at any zoom and print cleanly. How many mazes makes that many different mazes from your seed, one to a page, and with Answer pages at the end ticked, each also gets an answer page with the path drawn in. Each page's footer says the level, the size, the builder and the seed, so you can recreate a printed maze later. The PDF uses A4 or US Letter, with your wall colour on white paper whatever background you picked for the picture.
For a young child, use Kids or Easy with the recursive backtracker and Thick walls. For a puzzle book page, use Farthest apart, which picks the two edge cells with the longest walk between them.
For other printable puzzles, try the word search maker and the crossword puzzle maker.
Questions
Yes. Each maze is a perfect maze: all cells are joined, with exactly one path between any two. The generator checks this for every maze, and the solution switch shows the path.
Use the same seed with the same settings. Type the seed into the Seed box, or open a link made with Copy link, which holds the seed and every setting.
Keep Answer pages at the end ticked and click Save PDF. Each maze has a page, and each answer page shows the same maze with the path drawn in.
The recursive backtracker gives the fewest wrong turns at a given size. Prim and Kruskal give more branching, so more places to go wrong.
Square mazes from 3 by 3 to 100 by 100 cells, and round mazes from 3 to 40 rings. The Level buttons are shortcuts to common sizes.
You choose a pattern: top to bottom, left to right, opposite corners, farthest apart or random sides. The exact cell on the edge is picked from the seed, except for corners.
Yes. Set How many mazes to up to 20. They go into one PDF, one to a page. Use Previous and Next to look at each on screen.
This version is made for printing. Save the PDF and let them use a pencil, then check with the answer page.
No. The maze, the PDF and the PNG are all made in your browser. Only your settings are kept on this device, not the seed.