Maze generator

Draw a random perfect maze at your chosen size — show its shortest solution, download, or print.

2–100 cells per side; total under 10,000 cells

Generated and drawn in this browser. Nothing is sent anywhere.

Perfect mazes (exactly one path between any two cells) via a recursive backtracker, entrance at top-left and exit at bottom-right. The solution is a shortest path.

How to use

  1. Set the grid size.
  2. Generate the maze.
  3. Reveal the solution or download the PNG.

What it supports

Recursive-backtracker mazes: every cell is reachable and there is exactly one path between any two cells, so the shown solution is the only one (entry top-left, exit bottom-right). 2–100 cells per side, 10,000 cells total.

Related tools

Related guides