Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Related tools
Next step
Word Search Puzzle GeneratorConnect the Dots Generator
Same situation
Crossword Puzzle MakerNonogram Generator (Picross)Sudoku Generator & Solver
Home Page > Miscellaneous > General Tools

Maze Generator

Build a solvable puzzle with MiniWebtool’s Maze Generator. Set dimensions, entrance and exit, and colors, then download the maze as PNG or SVG or view the solution as an animated GIF.

Need help using this tool? Ask AI

For Gemini, paste the copied question into the chat. You can also copy it below.

View the question

3 free uses dailyNo sign-up requiredInstant Results
Maze GeneratorTry it now — free ▼
Pick a size and corners, generate a 21 × 21 maze, then reveal its solution path

Every maze is solvable. Download it as PNG or SVG, or as an animated solution GIF.

Configure Your Maze
Set dimensions, points, and colors
Quick Size Presets
Odd numbers recommended (5-101)
Odd numbers recommended (5-101)
Color Palette
Wall
Path
Start
End
Solution
GIF Animation Settings +
Leave blank for default sizing
Faster = smaller file, Slower = smoother animation

Embed Maze Generator Widget

Video Guide: Maze Generator

About Maze Generator

Welcome to the Maze Generator, a powerful tool for creating unique, solvable mazes instantly. Whether you need mazes for puzzles, games, education, or print materials, this generator offers full customization of size, entry/exit points, colors, and export formats.

At a Glance

Maze Generator creates a random, solvable maze from 5×5 to 101×101 cells. You choose the start and end points and colors, then download the maze as PNG or SVG or the solution as an animated GIF.

Maze Generator: features at a glance
FeatureWhat you getGood for
SizeWidth and height from 5 to 101 cells, using presets or custom values. Odd sizes are recommended, and even sizes are adjusted to the next odd number.Worksheets from small 11×11 mazes to large 101×101 puzzles
Start and end pointsPlace the entrance and exit at corners or at random positions along any edge.Mazes where the route runs in a direction you choose
Guaranteed solvableEvery maze is a perfect maze with exactly one path between any two cells. The shortest solution is found by breadth-first search.Puzzles and games that need a valid solution
ColorsSet separate colors for walls, paths, start marker, end marker and solution line.Matching a maze to a theme or printing in specific colors
DownloadsPNG for printing and the web, SVG for lossless scaling, or an animated GIF that traces the solution.Printing worksheets or sharing the solution animation
GIF settingsAdjust the GIF width and the animation speed profile, from Fast to Slow, to trade file size against smoothness.Keeping the solution GIF small enough to share

How It Works

Depth-First Search Generation
The maze is carved using DFS with recursive backtracking, creating perfect mazes where any two cells connect via exactly one path. This produces challenging, aesthetically pleasing labyrinths.
Breadth-First Search Solving
BFS pathfinding finds the shortest route between start and end points. The solution is visualized in static images and as an animated GIF showing the path being traced.

Why Odd Dimensions?

The DFS algorithm operates on a grid where cells and walls alternate. Odd dimensions (11, 21, 31, etc.) ensure proper wall placement around the maze perimeter and produce cleaner maze structures. If you enter an even number, it will automatically adjust to the next odd value.

Usage Instructions

  1. Set maze Width and Height using presets or custom values (5-101, odd recommended).
  2. Select Start Point and End Point locations from corners or edges.
  3. Customize Colors for walls, paths, markers, and solution line.
  4. Optionally configure GIF Width and Animation Speed in advanced settings.
  5. Click Generate Maze and view results in the tabbed output section.
  6. Download your maze in PNG, SVG, or animated GIF format.

Export Format Guide

  • PNG: Raster image ideal for printing and web use. Fixed resolution based on cell size.
  • SVG: Vector format that scales perfectly to any size without quality loss. Best for large prints.
  • Animated GIF: Shows the solution path being drawn step-by-step. Great for presentations and sharing.

Frequently Asked Questions

What algorithm does this maze generator use?

This maze generator uses the Depth-First Search (DFS) algorithm with recursive backtracking for maze generation, which creates perfect mazes with exactly one path between any two points. For solving, it uses Breadth-First Search (BFS) to find the shortest path between start and end points.

Why are odd dimensions recommended for mazes?

Odd dimensions (like 21x21) are recommended because the DFS algorithm works on a grid where cells and walls alternate. Odd dimensions ensure proper wall placement around the maze perimeter and create cleaner maze structures. Even dimensions are automatically adjusted to the next odd number.

What image formats can I download the maze in?

You can download mazes in three formats: PNG (raster image, good for printing), SVG (scalable vector graphics, perfect for any size), and animated GIF (shows the solution path being drawn step by step). Each format has specific use cases depending on your needs.

Can I customize the colors of the maze?

Yes, you can fully customize five color elements: wall color (maze barriers), path color (walkable areas background), start point color (entry marker), end point color (exit marker), and solution path color (the line showing the route through the maze).

What affects the GIF file size and animation speed?

GIF file size is affected by maze dimensions, target width setting, and animation speed profile. Larger mazes and slower animations create bigger files. The speed profile controls frame rate: Fast creates smaller files with fewer frames, Slow creates smoother animations with more frames but larger file sizes.

How large should I make a maze for a printable activity sheet?

For a simple worksheet, try an 11-by-11 or 21-by-21 maze and see how much space you have on the page. An 11-by-11 maze is quick to solve and prints clearly at a modest size; a 21-by-21 maze offers a longer challenge but needs more room or smaller cells. If you plan to enlarge the artwork, SVG is a useful export because it scales without losing sharpness. Leave margins for the start and end markers.

Why does a generated maze have only one route between two points?

This generator creates a perfect maze, where there is exactly one path between any two cells. Its depth-first search process carves passages without adding loops, so the solver has to follow the intended route rather than choose between several alternate corridors. That structure makes the maze solvable and can still be challenging because of its twists and dead ends. If you want a maze with multiple possible routes, this generator’s described algorithm does not create that style.

How can I make a maze harder without making it too large to print?

Increase the width and height modestly, such as moving from 11-by-11 to 21-by-21, to create more cells and a longer route. You can keep the artwork printable by choosing SVG, which scales cleanly, or by fitting the maze to the available page space. A very large grid can become hard to solve on a small printout because passages are narrow. Try a medium size first and adjust based on the intended solver’s age and patience.

Learn More

Reference this content, page, or tool as:

"Maze Generator" at https://MiniWebtool.com/maze-generator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Jan 16, 2026

Chat with your favorite AI

For Gemini, paste the copied question into the chat. You can also copy it below.

View the question

General Tools:

Top & Updated:

Word Ladder GeneratorSlitherlink Puzzle GeneratorKiller Sudoku GeneratorView all →
Home Page > Miscellaneous > General Tools > Maze Generator