Maze Generator
Generate a fresh, guaranteed-solvable maze from tiny to giant, with a toggleable solution path, printable or downloadable as PNG, in your browser.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
How the maze generator works
- Choose a maze size, from tiny to giant.
- Click Generate new maze — a fresh, guaranteed-solvable maze is carved out from scratch.
- Click Show solution to reveal the path from start (green) to end (red), or hide it again; print or download the result as a PNG.
How the maze is generated
The maze starts as a fully-walled grid, then a randomized depth-first search "carves" a path: it moves to a random unvisited neighboring cell, knocking down the wall between them, and backtracks whenever it hits a dead end. This is a classic, well-understood maze algorithm that always produces a single connected path between any two points with no loops or isolated sections.
FAQ
Is every generated maze solvable?
Yes. The generator uses a randomized depth-first search that always carves exactly one path between any two cells, with no isolated sections and no loops — every maze it produces has exactly one solution from the green start to the red end.
How big can the maze get?
Sizes range from a tiny 10×10 up to a giant 45×45 grid. Larger mazes take a moment longer to generate and solve, but everything happens instantly in your browser regardless of size.
Can I print the maze?
Yes — click Print maze to open a print-ready version in a new tab, or Download PNG to save the image and print it later.
Does "Show solution" reveal the only path, or just one possible path?
Since this generation method never creates loops, there's exactly one path between the start and end — so the solution shown is the only path, not just one of several options.
How we compare
| Feature | Online Tool Store | Maze Generator (mazegenerator.net) | Printable maze books |
|---|---|---|---|
| Unlimited, instant regeneration | ✓ | ✓ | Fixed set of mazes |
| Built-in solution toggle | ✓ | ✓ | Answer key in the back |
| Free, no ads | ✓ | Ad-supported | One-time purchase |
For an endless supply of fresh, printable mazes at any size without ads, the Online Tool Store Maze Generator is ready whenever you need a new one.