Maze Generator (SVG / PNG)
Random
Pick a grid size (up to 60×60), cell pixel size, and a numeric seed. The tool runs a recursive-backtracking depth-first search to carve a perfect maze (exactly one path between any two cells) and renders it as SVG. Start cell is green, end cell is red. Toggle the solution overlay to see the BFS-shortest path drawn in blue, and download as a sharp SVG or a 2× PNG for printing on a worksheet, party game card, or escape-room handout.
How to use
- Set the grid width and height (4-60) and the cell size in pixels.
- Pick a seed manually or click 'New seed' for a fresh maze.
- Toggle 'Show solution' to verify difficulty, then download as SVG (vector) or PNG (2× rasterized for printing).
Frequently asked questions
- What is a 'perfect maze'?
- A maze with exactly one path between any pair of cells — no loops, no isolated regions. Recursive-backtracking always produces a perfect maze and tends to create long, winding corridors with relatively few branches, which feels harder for kids than other algorithms (Prim's, Kruskal's, Wilson's).
- Why use a seed?
- The same seed + same size always produces the same maze. Lets you share a specific maze with someone (the seed is in the filename), reprint it later, or A/B compare difficulty.
- Why does the solution look fairly direct?
- Recursive-backtracking biases toward long corridors. The shortest path will be relatively direct compared to other algorithms — but the dead-ends are plentiful, which is what makes solving without the overlay tricky.
- Can I get a circular or hexagonal maze?
- Not from this tool — only rectangular grids. Circular and hexagonal mazes need different topologies and rendering, which would be a separate tool.
Related tools
Random Number Generator
Generate cryptographically random numbers in any range — with or without duplicates, optionally sorted.
Group Maker
Split a list of names into balanced random groups — pick the group count or the people per group.
Raffle Draw
Pick N winners from a list of names — cryptographically random, with or without duplicates.
Dice & Coin Roller
Roll polyhedral dice (d4–d100) or flip a coin with cryptographic randomness.
Random Picker — Roulette & Ladder
Pick a winner with a spinning wheel or a ladder (ghost-leg) draw.
Password Generator
Generate strong, random passwords that never leave your browser.