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
QR Code GeneratorVenn Diagram Generator (3 Sets)🥧 Pie Chart MakerRandom Date GeneratorRandom Quote GeneratorGraph Coloring CalculatorTraveling Salesman Solver (TSP)
Home Page > Miscellaneous > General Tools

Maze Generator

Generate random, solvable mazes with custom dimensions, start/end points, and colors. Download as PNG, SVG, or animated GIF solution.

Free to useNo sign-up requiredUpdated Jan 2026
Maze GeneratorTry it now — free ▼
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.

Key Features

  • Custom Dimensions: Create mazes from 5×5 to 101×101 cells. Odd dimensions recommended for optimal structure.
  • Flexible Entry/Exit: Place start and end points at corners or random positions along any edge.
  • Guaranteed Solvable: Every maze has at least one solution path from start to end.
  • Color Customization: Personalize walls, paths, markers, and solution line colors.
  • Multiple Export Formats: Download as PNG (raster), SVG (vector), or animated GIF (solution visualization).
  • Animation Controls: Adjust GIF dimensions and animation speed for optimal file size and quality.

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.

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

General Tools:

Top & Updated:

Barcode GeneratorSpirograph GeneratorTessellation GeneratorView all →
Home Page > Miscellaneous > General Tools > Maze Generator