AI Maze Generator
Watch it build, then play — every maze is unique
Choose Your Maze
Game Modes
Classic
A new 15×15 maze every time
Daily Challenge
New maze every day — same for everyone
Time Attack
Race the clock on an 11×11 maze
Fog of War
Navigate blind — trust your memory
Optimal Path
Can you match the shortest route?
Generator
Custom mazes from 11×11 to 41×41
Download PDF worksheets
How to use the maze generator
AI Maze Generator creates a brand-new maze every time you load the page, animates how it is built, and then lets you play it right away. Everything runs in your browser, so a maze appears in a fraction of a second and nothing needs to be installed.
- Watch it build. The maze at the top of this page is carved out cell by cell in front of you. When the animation ends, press Play.
- Solve it. Move with the arrow keys or WASD on a computer, or use the on-screen D-pad on a phone or tablet. The counter compares your steps with the shortest possible route.
- Stuck? Press Show Solution to draw the shortest path, or New Maze to start over with a different layout.
- Make your own. Open the maze generator tool to pick a size, enter an optional seed, and download the result as PNG or PDF.
What people use it for
Classroom worksheets
Teachers use the print tool to make a whole stack of different mazes in one PDF, with answer pages at the end. Because each worksheet is unique, students cannot copy from each other. See our classroom guide for lesson ideas.
Activities for kids
Small mazes are a calm screen-free activity for road trips, waiting rooms and rainy afternoons. Start with an 11×11 maze and move up as children get faster. Our mazes for kids and easy mazes pages have ready-made starting points.
A real challenge for adults
A 41×41 maze takes real concentration. Try hard mazes, the Fog of War mode where you only see the cells around you, or the Daily Challenge, where everyone in the world gets the same maze each day. Solving a maze exercises planning, spatial reasoning and working memory, and a short daily puzzle is an easy habit to keep. Read more about what maze puzzles do for your brain, or browse mazes for adults.
Games, puzzle books and tabletop maps
Puzzle-book authors, game developers and Dungeon Masters use generated mazes as a base layout. A seed lets you recreate the exact same maze later. The maze maker and maze creator pages explain the workflow, and mazes can be used commercially.
Other shapes
Besides square grids you can play hexagonal, circular and triangle mazes, each with its own way of moving. Curious how a maze differs from a labyrinth? Our labyrinth generator page explains it.
Choosing a difficulty
The generator and print tool offer four sizes. Bigger mazes have more dead ends and a longer solution path.
| Size | Level | Good for |
|---|---|---|
| 11×11 | Easy | Young children, warm-ups, a quick break |
| 21×21 | Medium | Older kids and most worksheets |
| 31×31 | Hard | Teens, adults, puzzle books |
| 41×41 | Expert | Long solving sessions and a real test of patience |
How the mazes are generated
Each maze starts as a grid of closed cells. A randomized depth-first search walks from cell to cell, knocking down the wall between the current cell and a random unvisited neighbour. When it reaches a dead end it backtracks until it finds a cell with unvisited neighbours, and it stops once every cell has been visited. The result is a "perfect" maze: every cell is reachable and there is exactly one route between any two points.
The shortest route is found with the A* pathfinding algorithm, which is what powers Show Solution, the optimal step count and the answer pages in printed worksheets. Want the full story? Read our guide to maze generation algorithms and how to solve mazes.
Wondering whether an AI chatbot could solve these mazes, or whether you can make one it cannot? We look at that question in Can AI solve a maze?
Maze generator FAQ
Is this maze generator free?
Yes. Generating, playing, printing and downloading mazes is free and unlimited, and you do not need an account. The site is supported by ads.
Can I use the mazes commercially?
Yes. Mazes you generate can be used in books, worksheets, games, apps and other commercial projects, and attribution is not required. Section 5.2 of our terms of service has the details.
Does every maze have a solution?
Yes. Every maze is a "perfect" maze: all cells are connected and there is exactly one path between any two points, so there is always exactly one way from start to finish.
Is the maze made by generative AI?
No image model is involved. Mazes are built by a classic search algorithm (randomized depth-first search with backtracking) running in your browser, and solutions come from the A* pathfinding algorithm. That is why every maze is guaranteed to be solvable, which image generators cannot promise.
Which export formats are available?
PNG and PDF. The print tool builds multi-maze PDF worksheets on A4 or A5 paper, with optional answer pages. SVG and animated GIF export are not available yet.
More answers on the full FAQ page.