---
title: "Maze Generator - Create Random Perfect Mazes Online | CanDoYa"
description: "Generate random perfect mazes online with adjustable size, view the solution path, and download as PNG or SVG. No sign-up required - runs entirely in your browser."
url: https://candoya.com/tools/maze-generator/
locale: en
type: browser-tool
---

# Free Maze Generator

Category: Games & Fun

## What is a maze generator?

A maze generator is a free tool that creates random, solvable perfect mazes of any size (5x5 to 50x50 cells) using recursive backtracking. Adjust the width and height, regenerate instantly, toggle the solution path overlay, and download your maze as PNG or SVG - all in your browser with no upload.

This maze generator creates perfect mazes (exactly one path between any two cells, no loops) using a proven recursive backtracking algorithm. Every maze is solvable, and you can instantly see the solution path from start (top-left) to end (bottom-right). The tool runs entirely in your browser, so your mazes are never uploaded or stored anywhere.

## How to use it

1. **Set the maze size** - Use the width and height sliders or number inputs to choose a grid size between 5 and 50 cells.
2. **Generate the maze** - Click Regenerate to create a new random perfect maze with the current dimensions.
3. **View the solution (optional)** - Check the 'Show solution path' box to overlay the path from start to end in blue.
4. **Download or copy** - Copy the maze to your clipboard, download as PNG (raster) for printing, or download as SVG (vector) for editing.

## Who it's for

- **Educators and parents** can generate printable mazes for classroom activities, homework, or rainy-day entertainment for kids.
- **Game developers** can use the algorithm and SVG export as a foundation for procedural dungeon or level generation.
- **Puzzle enthusiasts** can create custom maze sizes for personal collections, print them for solving, or share them with friends.
- **Graphic designers** can export mazes as vector graphics (SVG) for use in posters, book covers, or interactive media.

## Expert note

Perfect mazes generated by recursive backtracking produce long, winding corridors with few dead ends - a distinctive aesthetic compared to other algorithms like Prim's or Kruskal's, which create more branching paths. This makes them ideal for printable puzzles and educational use.

## Frequently asked questions

### Is the maze generator free?

Yes - 100% free, no sign-up, no limits. Generate as many mazes as you want, in any size from 5x5 to 50x50 cells.

### Is my maze data uploaded anywhere?

No. The maze is generated, rendered, and downloaded entirely in your browser. CanDoYa never receives the maze data or any information about what you generate.

### What is a perfect maze?

A perfect maze is a maze with exactly one path between any two cells and no loops. Every cell is reachable from every other cell, and there is only one way to get from the start to the end.

### Can I print the maze?

Yes. Download the PNG version to print directly, or download the SVG to edit the line thickness, colors, or size in a vector editor before printing.

### What algorithm does it use?

The tool uses recursive backtracking (depth-first search), a fast and proven method that carves passages through a grid by removing walls between unvisited cells.

### How do I solve the maze?

Toggle 'Show solution path' to see the blue line from the top-left corner (start) to the bottom-right corner (end). The solution is found using breadth-first search.

### Can I use the SVG in my own project?

Yes. The SVG export is a standard vector graphic that you can edit in Inkscape, Adobe Illustrator, Figma, or any vector editor, or embed in a web page.

## Related tools

- [Bingo Card Generator](https://candoya.com/tools/bingo-card-generator/)
- [Reaction Time Test](https://candoya.com/tools/reaction-time-test/)
- [Typing Speed Test](https://candoya.com/tools/typing-speed-test/)
- [Anagram Game](https://candoya.com/tools/anagram-game/)
- [Countdown Timer](https://candoya.com/tools/countdown-timer/)

---

*Markdown edition of <https://candoya.com/tools/maze-generator/>, published for AI agents and other automated readers. Index of key pages: <https://candoya.com/llms.txt>.*
