Handitab

Maze Generator

Generate a random printable maze from 5 to 60 cells per side, with the entrance at the top left and the exit at the bottom right, as a PNG.

About Maze Generator

A maze generator builds a random puzzle of walls and passages. This tool carves a square grid with the depth-first search (recursive backtracker) algorithm, which produces a perfect maze: every cell is reachable and there is exactly one route between any two cells. The entrance is on the left of the top-left cell and the exit on the right of the bottom-right cell. No solution is drawn.

How to use Maze Generator

  1. Set "Cells per side". The preview updates as you change them.
  2. Check the preview, then press "Download result" to save the file.

Questions about Maze Generator

Does every maze have a solution?

Yes. The algorithm visits every cell and never creates closed-off areas or loops, so there is always exactly one path from the entrance at the top left to the exit at the bottom right.

How do I make the maze harder or easier?

Change the number of cells per side. A 5 by 5 maze suits young children, 20 by 20 is a moderate puzzle, and 60 by 60 gives 3,600 cells with long winding corridors.

Runs in your browser. Page last updated .

More random generators and games

All 31 random generators and games