Tested tool guide
Tested browser tools
Checked August 16, 2026
What Maze Generator does, with a checked example
Pick a grid size and, if you want, a difficulty, and this tool draws a maze you can print and solve by hand. It carves the maze with recursive backtracking: starting from one cell, the generator randomly breaks a wall into an unvisited neighbor, backs up when it gets stuck, and repeats until every cell is reachable. The output is always a 'perfect' maze: exactly one solution path, no loops, no unreachable dead zones. The usual surprise is that harder settings do not add extra routes - the structure cannot contain them; difficulty comes from grid size and where the entrance and exit sit.
Worked example
A concrete input and expected output from the current implementation.
Input
Grid size: 5 columns by 5 rows
->
Expected output
A square maze of 25 cells: 24 walls carved open out of the 40 interior walls, 16 walls left standing, and exactly one solution path from the entrance to the exit.
Recursive backtracking removes exactly one wall per cell after the first, so open passages equal cells minus one (25 - 1 = 24). Because a passage never enters an already-visited cell, the routes form a tree, which guarantees exactly one solution path.