Maze Generator

Make a maze in your browser and print it, or download it as SVG or PNG. Pick a shape, a cell style, a size and an algorithm; the maze redraws as you change them. Free, with no sign-up, and every maze you make is yours to use.

Outline
Cell style
Size

2 to 150 cells each way. 20 by 25 fills a page.

Inner room
Starts at
Algorithm
Seed

Leave empty for a random maze. Type any word or number to get the same maze every time.

Drawing
Your maze
Cells Path Dead ends Difficulty Seed Drawn in

How the maze is made

Every maze here is a perfect maze: one route between any two points, no loops, no unreachable corners. It takes three decisions.

Lay down a grid

Square, hexagonal, triangular or polar cells are tiled across the page, then any cell outside your chosen outline is dropped. Every cell starts fully walled.

Knock down walls

An algorithm opens walls one at a time until every cell is connected exactly once. Which walls it chooses, and in what order, gives the maze its character.

Open the doors

An entrance and an exit are cut in the outer wall (or in the inner room), the shortest route is found with a breadth-first search, and the drawing is written as vector paths.

Shapes and cell styles

Any outline can hold any cell style. These examples are generated live on this page; press a button to load its setup into the generator.

Four ways to carve a maze

Same 10 by 10 grid, same seed, four algorithms. The differences you see here scale up: choose by the feel you want, then adjust size for difficulty.

Default

Recursive backtracker

Walks as far as it can, then backs up. Long winding corridors, few dead ends, a long solution. The twistiness slider controls how often it turns.

Most dead ends

Prim's algorithm

Grows outward from one cell by opening random frontier walls. Lots of short branches, a short solution, and a busy texture that punishes guessing.

Most uniform

Kruskal's algorithm

Shuffles every wall and opens any that joins two separate regions. No visible origin, even texture, good for large batches that should all feel alike.

Long runs

Hunt and kill

Walks until stuck, then scans for the first unvisited cell next to the maze and starts again there. Long corridors with sudden reversals.

Who uses it

Mazes turn up in more places than puzzle books. A few of the jobs this generator is built for.

Teachers

Worksheets that build pencil control and planning. Same seed for the class, different seed for each pupil, answer key one click away.

Puzzle-book makers

Consistent difficulty ladders, page-number seeds, SVG export for print on demand. Commercial use is allowed without a licence.

Parents

A fresh maze whenever one is needed, sized for the child. Thick lines and big cells for beginners.

Party and event hosts

Race sheets, clue mazes, invitations with the details hidden in an inner room, plans for a taped-out floor maze.

Designers

Circular, hexagonal and triangular mazes as vector art for posters, cards, logos and backgrounds.

Programmers and students

A working example of four spanning-tree algorithms and a breadth-first solver, readable in the page source.

Everything in the generator

  • Four outlines, four cell stylesRectangle, circle, triangle and hexagon, with square, hex, triangle or polar cells.
  • Four algorithmsBacktracker, Prim, Kruskal and hunt and kill, plus a twistiness control.
  • Up to 150 by 150 cellsDraws in a fraction of a second, entirely in your browser.
  • Inner roomA walled centre with one door. Start from it or aim for it.
  • Solution overlayOne click shows the route; export it as a separate answer key.
  • SVG, PNG and printVector for print, raster for web, or send just the maze to the printer.
  • Seeds and share linksRecreate any maze from its seed; the link carries every setting.
  • Your colours and line weightWall, background and solution colours; thickness from hairline to crayon.
  • Private and offline-friendlyNo uploads, no account, no third-party scripts. Works after the page has loaded.

Questions people ask

Is the maze generator free?

Yes. Every feature on the page is free, there is no account, and there is no limit on how many mazes you generate or download.

Can I use the mazes commercially, for example in a book I sell?

Yes. Mazes you generate here are yours to use for any purpose, personal or commercial, without attribution. This differs from some other generators, so check the terms of any other source you combine with.

What is the largest maze I can make?

Up to 150 by 150 cells (22,500 cells). That is far larger than fits legibly on a page; most printed mazes are between 10 and 40 cells across.

What is the difference between the outline and the cell style?

The outline is the overall silhouette (rectangle, circle, triangle, hexagon). The cell style is the shape of each little compartment inside it (square, hexagonal, triangular, or polar rings for circles). They combine freely.

How do I get the solution?

Press the solution button under the maze. It overlays the one correct route in the solution colour. Toggle it on before downloading to export an answer key, and off to export the puzzle.

How do I make the same maze again?

Type a seed of your own (any word or number) before generating, or press the link button after generating. The link carries every setting plus the seed, and opening it draws the identical maze.

Which file should I download for printing?

SVG for anything that will be resized or professionally printed; it stays sharp at any size. PNG for websites, slides or apps that do not accept SVG. The print button prints just the maze directly.

Does the site upload or store my mazes?

No. Everything is computed in your browser. Nothing is sent to a server, no account exists, and the site loads no third-party scripts or trackers.

Which algorithm should I choose?

The backtracker for classic long winding corridors, Prim for lots of branching and dead ends, Kruskal for an even random texture, hunt and kill for long runs with reversals. The guides section explains each in detail.

Why is the polar cell style only available for circles?

Polar cells are wedges of concentric rings, which only make sense inside a circle. For other outlines choose square, hex or triangle cells; you can still put those inside a circle if you prefer a grid-like circular maze.

Guides

Longer reads on difficulty, algorithms, printing and using mazes in classrooms, books and games.

30 Aug 2026 · Shapes

Circular mazes: how the polar grid works

Polar (theta) mazes use rings and spokes instead of rows and columns. Learn how cells are split as rings grow and how to get a good circular maze.

Read all 15 guides

Need a maze right now?

Scroll up, press generate, and print. Everything you make here is free to use, in the classroom or in a book you sell.

Back to the generator