GENERATORS · BFOTKIT

Maze Generator

Generate perfect mazes with a guaranteed single path between entrances — recursive backtracker, adjustable size, export as PNG.

Maze generator How it works

How a perfect maze works

The generator starts at one cell and repeatedly walks into unvisited neighbors, carving passages, and backtracks when stuck. The result is a maze with loops nowhere and one unique route from any cell to any other.

Making it harder

Bigger grids are disproportionately harder: dead ends multiply and the longest path grows quickly. A 51×41 maze is already a solid challenge on paper.

Solving trick

Keep one hand on the left wall and walk — wall-following solves any perfect maze without loops.

Maze generator FAQ

Is there always a solution?

Yes. The recursive backtracker carves a spanning tree, so every cell stays reachable and there is exactly one path between any two points.

Can I print it?

Yes — download the PNG and print it. Walls are crisp black lines on white for cheap printing.

How big can it go?

Up to 101×81 cells on a 1200×960 canvas — enough for a serious puzzle sheet.

Does it run locally?

Yes — generation and drawing happen entirely in your browser.

Everything runs in this browser tab. Nothing is uploaded. — For fun only — nothing here is a guarantee.

EXPLORE BY CATEGORY · BFOTKIT

More tools like this

Pick a category to see every tool in it — then open one and discover related tools.

Browse all tools