Maze Generator - Printable Mazes from Easy to Expert, with Solutions

AdSense Placeholder
Slot: header_tool

Maze Generator

Random printable mazes in any size, each with one solution

AdSense Placeholder
Slot: tool_mid_article

Always Solvable

Every maze is a "perfect" maze: exactly one path connects any two points, so there is always one solution.

Reproducible

Each maze has a number; enter it again to get exactly the same maze, for example to share an answer key.

Any Difficulty

Small grids for young children, up to 80×80 for a real challenge.

Print or Save

Print directly or download a PNG, with or without the solution drawn in.

How the Mazes Are Made

The generator starts in one corner and carves a path in a random direction, backing up whenever it reaches a dead end, until every cell has been visited. This method, the recursive backtracker, gives long, winding corridors with relatively few short dead ends, which makes mazes satisfying to solve by hand. The solution is found with a breadth-first search, which always finds the shortest route.

For printing, around 15×15 suits young children, 25×25 fills a page nicely for older children, and 40×40 or more makes a slow puzzle for adults. Print one copy with the solution hidden and another with it shown to use as an answer key.

Key Takeaways

  • One true path: Perfect mazes have no loops.
  • Save the number: It recreates the exact same maze later.
  • Answer key: Print a second copy with the solution shown.
AdSense Placeholder
Slot: footer_leaderboard