1. Home
  2. Productivity tools
  3. Maze Generator

Maze Generator

Make a maze for a child, a worksheet or a game night. Pick the size and shape; the solution is on a second page.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Maze Generator

  1. Choose the settings or press a sample to see an example.
  2. Look over the sheet and its answer pages in the preview.
  3. Download the PDF (or SVG and PNG) and print at 100% scale.

Features

  • Rectangle, circle and diamond shapes
  • Sizes from 5 x 5 to 60 x 70 cells
  • Perfect maze: exactly one route and no closed-off cells
  • Solution page with the shortest route
  • Title for the worksheet header

Supported formats

Input

  • Typed settings

You get

  • On-screen preview
  • PDF at true size, every page
  • SVG and PNG of each page

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Maze Generator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Mazes are perfect (one route between any two cells); they have no loops or several exits.
  • The exit is the cell farthest from the start, which is not always the corner.
  • Print at 100% scale (actual size) for true-size sheets.
  • Everything runs in your browser; nothing you type is sent anywhere.

Guide

Making a printable maze: perfect mazes, shapes and the shortest route

A good maze has one right way through and plenty of tempting wrong turns. This generator makes mazes of that kind in the size and shape you choose, prints the worksheet with a green start and a red exit marked, and puts the solution on a second page so you can check an answer at a glance.

How the maze is built

The page marks every cell of the chosen shape and then runs a depth-first search from the starting cell. At each step it picks a random unvisited neighbour, knocks down the wall between the two cells and moves on; when a cell has no unvisited neighbour it backs up to the last cell that has one. When the stack empties every cell has been visited exactly once as a new cell, which means the passages form a tree: any two cells are joined by exactly one route, there are no loops and no sealed-off areas. The number of passages is always one fewer than the number of cells.

Shapes

A rectangle uses every cell of the grid. A circle keeps the cells whose centres lie inside the ellipse that fits the grid, and a diamond keeps those where the horizontal plus the vertical distance from the centre, each measured in half-widths of the grid, is at most one. Cells outside the shape are left out, and the outer wall follows the shape’s edge in steps. The shape fills the same page area as a rectangle of the same grid size, so a circle maze has fewer cells than a rectangle of equal width and height.

Start, exit and solution

The start S is the first cell of the shape from the top left. The exit E is not placed in a corner: after the maze is carved the page measures the number of steps from S to every cell and puts E at the cell with the largest number, so the route is as long as that maze allows. The solution page uses the shortest route, which for a perfect maze is the only route, and draws it as a thick red line over the walls.

A worked example

The default 25 by 30 rectangle has 750 cells and its shortest route is 422 cells long, more than half of the maze. The sample for a young child is 10 by 10, with 100 cells and a route of 69 cells. The circle and diamond samples are 35 by 35 and keep fewer cells than the 1,225 of a square grid of that size. Each sample gives two pages: the worksheet and the solution. The header carries name and date lines, and the title box lets you write a line such as Help the mouse find the cheese.

Choosing a size

Corridors get narrower as the grid gets larger because the maze always fills the page. At 10 by 10 each cell is about 18 mm wide on A4, which suits a thick crayon. At 25 by 30 it is about 7 mm, which suits a pencil. The limits are 5 to 60 cells across and 5 to 70 down. A tall, narrow maze fills the height of the page and leaves empty margins at the sides.

Limits

Every maze is perfect, so there are no loops, shortcuts or several exits, and there are no pictures or themed shapes beyond the three outlines. The exit is chosen by distance and cannot be moved. The maze is drawn at true size for A4 or US Letter; print at 100 percent. Nothing you set is sent anywhere.

Checked against the current version of the Maze Generator on .

Frequently asked questions

Why do these mazes have so many long corridors?

A depth-first search keeps carving forward until it is stuck before it backs up, so it favours long winding passages and fewer branches than other methods. That makes the route to the exit long, which suits patient solvers.

What size should I choose for a six-year-old?

A 10 by 10 or 12 by 12 maze is a good start: the corridors are wide at this size and the route is short enough to finish in a few minutes.

Can I get the same maze again?

Yes. The maze number acts as a seed; the same number, size and shape always give the same maze, so a worksheet can be reprinted or shared.

How hard is a 10 by 10 maze?

A 10 by 10 maze is short enough for a young child. Use 25 by 30 or larger for older children and adults; the route to the exit grows with the size.

Can I print the maze at a larger size?

The maze is scaled to fill the page. A smaller grid gives bigger corridors, which is easier for small hands.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.