GALAXY OF TOOLS

PLAY SECTOR

Maze Generator

Create rectangular or circular mazes of any size with a seed, show the solution, and print or download as PDF or PNG.

Preview — puzzle page and solution page

Mazes are perfect (every cell reachable, exactly one route) and generated in your browser from the seed.

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Printable maze generator with rectangular and circular mazes

This maze generator draws a fresh maze every time you press the button: a classic rectangular grid from 4×4 up to 80×80, or a circular “theta” maze of up to 30 rings. Every maze is perfect — each cell can be reached and there is exactly one route from start to finish — and the solution is drawn on a separate page so you can print the puzzle alone or with its answer.

Parents and teachers use it for activity sheets and rainy afternoons, puzzle fans push the size up for a real challenge, and designers use the SVG-quality PDF and PNG for posters, colouring pages and game assets. A seed makes any maze reproducible: type the same seed, size and algorithm and you get the same maze on any computer.

Generation, the vector PDF (pdf-lib) and the PNG are produced in your browser; nothing is uploaded.

How to use the Maze Generator

  1. Pick a Shape: rectangular (set Columns and Rows) or circular (set Rings).
  2. Choose an Algorithm. The recursive backtracker makes long twisting corridors; Prim’s makes a bushier maze with many short dead ends.
  3. Keep or change the Seed and press Generate maze. The preview shows the puzzle page and the solution page.
  4. Tick Show solution on the puzzle page if you want the red route on page 1 as well; adjust Wall thickness for young children or fine printing.
  5. Set Paper and Orientation, then Print, Download PDF (both pages) or save either page as a PNG.

Maze Generator features

Two maze shapes

Rectangular grids and circular mazes whose rings subdivide as they grow, so cells stay roughly square all the way out.

Two carving algorithms

Recursive backtracker (depth-first search) for long solutions, Prim’s algorithm for a maze that branches everywhere.

Perfect mazes

Each generator builds a spanning tree, so every cell is reachable and the solution is unique — verified by a breadth-first search that also draws the route.

Sizes from easy to epic

4×4 for toddlers, 20×15 for a quick puzzle, 80×80 for a serious half-hour; circular mazes from 3 to 30 rings.

Seeded and reproducible

The seed, size, shape and algorithm fully determine the maze, so a class set can be reprinted months later.

Vector output

The PDF stores every wall as a line, so it prints razor-sharp at any size; the PNG is rendered at 2× for crisp screens.

Backtracker or Prim’s — which maze is harder?

The recursive backtracker walks from cell to cell, always moving to an unvisited neighbour and backing up only when stuck. It produces few but very long corridors; the solution often winds through much of the maze, so it feels harder to solve by eye. Prim’s algorithm grows the maze from the start by repeatedly opening a random wall on its frontier. The result has lots of short branches and a comparatively direct solution, which looks “busier” but is often quicker to solve. For young children choose Prim’s at a small size; for adults choose the backtracker at 40×40 or more.

How the circular maze is built

The centre is a single cell. Ring 1 has six cells; each further ring keeps the same number of cells until a cell’s outer edge would be about 1.6 times wider than the ring is thick, at which point the count doubles. Every cell connects to its two neighbours in the ring, to its parent cell on the ring inside, and to the one or two child cells on the ring outside. The carving algorithm then works on this graph exactly as it does on a grid. The start is the centre; the finish is an opening in the outer ring.

Tips

  • Print at 100% so the walls stay at the thickness you chose; thick walls help crayons stay inside the paths.
  • For a classroom set, print page 1 for the class and keep page 2 (the solution) for marking.
  • Need more puzzles for the same sheet? Add a word search or a sudoku, both printable in the same page sizes.
  • A seed can be any text — a date, a name or a joke — which makes it easy to remember which maze you handed out.

Maze Generator FAQ

Does every maze have exactly one solution?

Yes. Both algorithms carve a spanning tree, which by definition has one path between any two cells, and a breadth-first search confirms the route from start to finish before the pages are drawn.

Can I print the maze without the solution?

Yes — the solution is on page 2. Leave “Show solution on the puzzle page” unticked and print only the first page, or export page 1 as a PNG.

How big can a maze be?

Rectangular mazes go up to 80 columns by 80 rows (6,400 cells) and circular mazes up to 30 rings. Larger sizes still print sharply because the PDF is vector, but the paths get very small on A4.

What does the seed do?

It fixes the random choices, so the same seed with the same settings always gives the same maze. Press the refresh button beside it for a new random seed.

Why is the circular maze’s start in the middle?

Theta mazes are traditionally solved from the centre outwards; the single opening in the outer ring is the finish, marked with a red dot.

Is anything uploaded when I generate or download?

No. The maze, PDF and PNG are created in your browser and stay on your device.

You might also need