gizmobench
BrowseDaily

Maze Generator

Create a free rectangular maze from 2 to 100 cells a side. Choose a seed for a repeatable layout, add optional loops, and show the solution when you need the answer. Copy SVG, Download SVG and Print use the current maze and solution setting.

size not setLoops offSolution hiddenSeed pending

Carving the maze.

grid       20 x 20
algorithm  recursive backtracker

nothing built yet

Grid
x2 to 100 a side
Solution
Cells
none yet

Loops

With loops off the maze is a spanning tree carved by a recursive backtracker: every wrong turn ends in a dead end, and there is exactly one route between any two cells. Turning loops on opens a share of those dead ends into a neighbour, which adds passages to the maze already on screen rather than drawing a new one.

A perfect maze: exactly one route between any two cells, and every wrong turn ends in a dead end
  • Same seed, same mazeseed pending
    a maze has to build before it has a seed
  • Loops offoff
    nothing carved yet
  • Solution hiddenperfect maze
    no route to draw yet
The seed is the maze. A perfect maze: exactly one path between any two cells unless braiding is on. The same seed, grid size and loop setting produce the same maze, so a printed maze can be regenerated. The entrance is the top left cell and the exit is the bottom right, the solution is drawn through both doors when you show it, and Copy SVG and Download SVG hand you the same walls in black on white, with the solution on them only while it is showing.

Everything runs in this browser: nothing is uploaded, there is no account, and the grid size, seed and loop setting are remembered here so the next session opens where you left it. The Start over button at the top of the page forgets them.

Common questions

How do I make a custom or random maze?
Set the width and height independently for a rectangle, or use equal values for a square. Each side must be a whole number from 2 to 100 cells; 100 by 100 contains 10,000 cells. A fresh session starts at 20 by 20. New seed creates a different layout at the current size. Reuse the same seed, size and loop setting to rebuild it; seeds can contain up to 64 characters.
Can I make a small, simple maze?
A 5 by 5 grid has 25 cells and can be a starting point for a short printable puzzle. Larger grids contain more cells, but size alone does not measure difficulty. There is no rated easy or hard mode, and the tool does not guarantee a particular solving time.
Which maze generation algorithm does it use?
A randomized depth-first search, also called a recursive backtracker, visits each cell and opens a passage to an unvisited neighbor. It uses a stack to backtrack. With loops Off, the result is a connected grid with exactly one route between any two cells.
What does the loops setting do?
Some loops targets about a third of the initial dead ends; Many loops targets most. Each opening connects a dead end to a neighboring cell, adding a passage to the seeded layout. An opening can also remove a second dead end, so the displayed count is the number of openings, not a guaranteed percentage of dead ends removed. Added loops allow multiple routes between some cells.
Where are the entrance, exit and answer?
The entrance is above the top left cell and the exit is below the bottom right cell. Select Shown under Solution to draw the answer through both openings. With loops Off, this is the only route. With loops on, it is a shortest route. The summary gives its length in cells. The tool solves the maze it generates; it does not accept an image or file of another maze to solve.
How do I print a maze or save a PDF?
Print prepares a black-on-white sheet and requests your browser’s print dialog. Keep Solution Hidden for the puzzle, then select Shown and print again for an answer sheet. If your browser offers Save as PDF in its print dialog, you can use that option. There is no separate PDF file download.
What does Download SVG save?
Download SVG saves the current maze as a standalone vector image, including the solution only when it is Shown. Copy SVG puts that image’s markup on the clipboard. The exported walls are dark on a white background. SVG is the only direct file export; there is no PNG, ZIP, game-world file or downloadable maze-generator app.
Can I generate word mazes, hidden messages or shaped mazes?
This tool makes rectangular wall-and-passage mazes. It does not place words, letters, hidden messages or reading passages in cells, convert an image to a maze, or create circular, custom-shape or 3D mazes.
Does it remember my settings?
The grid size, seed and loop setting are saved in this browser when storage is available. The maze is generated locally and needs no account. If browser storage is blocked, generation still works, but settings will not be remembered.

A perfect maze: exactly one path between any two cells unless braiding is on. The same seed, grid size and loop setting produce the same maze, so a printed maze can be regenerated.