Maze Generator

Create printable mazes with one solution path — small to large.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Generate printable mazes for classrooms, puzzle books, kids’ activities or your own fun. Every maze is a perfect maze — there is exactly one path between any two points — so there is always a single clean route from the green start in the top-left to the red finish in the bottom-right, with no looping shortcuts.

How it works

The grid starts as a solid block of cells, each with four walls. The generator then runs the recursive backtracker (a randomised depth-first search): from the top-left cell it repeatedly knocks down the wall to a random unvisited neighbour, moves there, and when a cell has no unvisited neighbours it backtracks up the path it came from. Because every cell is visited exactly once and joined by a single removed wall, the result is mathematically guaranteed to be a perfect maze. The finished grid is drawn as crisp SVG vector lines.

Example

Choosing Medium builds a 16×16 grid (256 cells). The carving begins at cell (0,0), wanders through random neighbours, and backtracks at dead ends until all 256 cells are linked. The solver’s route runs from the green dot at the top-left to the red dot at the bottom-right.

SizeGridDifficulty
Small10×10quick / kids
Medium16×16standard
Large24×24challenging

Generate, then print or save as a PDF in your browser. Everything is generated and drawn locally — nothing is uploaded.

Ad placeholder (rectangle)