Maze generator
Pick a level and a shape and the maze appears below, ready to solve on screen or print. Every maze has a number: type the same number back in, or send the link, and you get the same maze again, answer key and all.
More options: size, algorithm, lines
Maze 1, Medium
Challenge a friend to this exact maze. Solve it first and the link carries your time.
The pages below are what prints.
How hard is each level
A level is a recipe (grid size and algorithm) plus a check. After a maze is built we solve it and measure it. If its estimated walk does not fall inside the level's range, the generator tries the next variation of that same number, so a maze is never labeled Easy unless it measures easy. The numbers below are medians over mazes 1 to 30 of each level in the rectangle shape, worked out by the same code when this page was built.
| Level | Grid | Algorithm | Answer path | Forks on it | Dead ends | Longest dead end | Estimated walk |
|---|---|---|---|---|---|---|---|
| Very easy | 6 x 6 | Recursive backtracker | 17 | 2 | 4 (11%) | 11 | 34 |
| Easy | 9 x 11 | Recursive backtracker | 41 | 4 | 11 (11%) | 29 | 96 |
| Medium | 15 x 17 | Wilson's (unbiased) | 41 | 20 | 74 (29%) | 25 | 230 |
| Hard | 22 x 26 | Growing tree hybrid (75% newest) | 83 | 31 | 140 (24%) | 54 | 538 |
| Expert | 31 x 37 | Recursive backtracker | 415 | 28 | 115 (10%) | 201 | 1,124 |
| Full-page challenge | 63 x 76 | Recursive backtracker | 1,268 | 91 | 477 (10%) | 958 | 4,696 |
What the numbers mean
- Answer path: the squares on the one way from Start to End.
- Forks on it: the places on that path where you have to choose. Very easy mazes have two or three, so a small child mostly follows one long path.
- Dead ends: squares with only one way in. The recursive backtracker leaves about one square in ten as a dead end, but its dead ends run long. Wilson's and the hybrid leave about one in four, most of them short.
- Estimated walk: the squares a solver walks who can spot a dead end up to 3 squares ahead and otherwise picks a way at random. It counts the answer path plus every wrong turn deeper than 3 squares (walked in and back out, and taken before the right way half the time). This is the number the levels are judged on.
Why these algorithms
The very easy and easy levels use the recursive backtracker because it makes the fewest forks: young children follow a long, winding path and meet only a few choices. Medium uses Wilson's algorithm, which picks evenly from every possible maze on the grid, so it has no house style. Hard uses a growing tree hybrid that keeps long corridors but branches more often, so there are more places to go wrong. Expert and the full-page challenge go back to the backtracker for its long, convincing dead ends: a wrong turn can run for a hundred squares or more before it stops. You can override the algorithm under More options to compare.
Full-page challenge
One maze fills the whole printable page in tiny 3 mm squares: 63 by 76 on US Letter, 61 by 82 on A4. It is the kind of maze that takes a while to get through. The median answer path is 1,268 squares with 91 forks, and the longest wrong turn runs 958 squares before it ends, which is easy to follow a long way before you notice.
- Choose Full-page challenge as the level. It prints one maze per page with its answer key on a page of its own.
- Cell size goes down to 2.5 mm (76 by 92 on Letter). We stop there so a sharp pencil or a fine pen still fits between the walls. The limit is 9,000 squares per maze.
- Lines print as vectors (SVG), so walls stay sharp at any printer resolution. Keep the print scale at 100%.
- Pumpkin, tree, heart and round shapes work at this level too. A picture fills less of the page, so it has fewer squares than the rectangle.
- On a phone, play it on screen with + to zoom; the view follows your marker as you move.
Shapes
Rectangles are the classic printable maze. Round mazes start in the centre and work out to one gap in the rim. Picture mazes keep only the squares inside an outline: a pumpkin, a ghost (its eyes are solid blocks you have to walk around), a witch hat, a Christmas tree, a star, an ornament and a heart. The picture shrinks or grows with the level so the maze still measures right.
Seasonal sets with these shapes: Halloween mazes and Christmas mazes.
Printing, worksheets and batches
- Paper: US Letter or A4, with 10 mm margins.
- Mazes per page: 1, 2 or 4. Each maze is captioned with its number, level and shape.
- How many mazes: up to 40 in one go, numbered in a row from the number you chose, so maze 300 to 329 is a set you can make again later.
- Answer key pages: printed after the puzzles in the same layout, with the way through drawn in red.
- Worksheet: adds a name and date line to the top of each puzzle page (never to the answer pages).
- Download: SVG keeps lines sharp for print shops and design apps; PNG is a 2,400-pixel picture for slides or a classroom screen.
Want something ready to go? The printable mazes page has sets by level that load in one tap.
Play on screen
Drag along a corridor with a finger or mouse, use the arrow keys, or tap a spot further along a corridor to jump there. A tap never carries you past a fork, so it cannot solve the maze for you. Your trail shows the route you are on and shrinks when you back up. Show answer draws the way through; a solve with the answer showing is not counted as your best. Next maze moves to the next number at the same level.
For a party, print the same maze number for every player and race; the first to the End wins. More ideas on the Halloween party games page.
What this page adds
Other maze makers print good mazes, and several have answer keys and batches. What we add: a maze number you can share or reprint, a level label that is measured rather than guessed, the measurements shown under every maze, picture shapes and round mazes at every level, a full-page challenge tuned for long dead ends, and the same maze playable on a phone with the answer one tap away. Nothing to sign up for and no PDF to download; your browser prints the page.
Maze questions
Does every maze have a way through?
Yes. Every maze is a "perfect" maze: there is exactly one path between any two squares, so there is one way from Start to End and no loops. The tests behind this page build thousands of mazes on every shape and check that rule on each one. If you pick "Fewer dead ends" under More options, loops are added on purpose and the page says so.
How do I print the same maze again?
Type its maze number back in with the same level and shape, or use "Copy link to this maze". The number seeds the generator, so maze 4821 at Hard in a circle is the same maze on any device, today or next year.
What makes a maze hard?
Size does most of the work: a bigger maze has more wrong turns to try. The algorithm sets the texture. A recursive backtracker draws long winding corridors with few forks and long dead ends; Prim's draws many short dead ends you can see past at a glance. We measure each maze and only give it a level when the measurement fits (the table above).
What is a circular maze?
A round maze (also called a theta maze) is built in rings around a centre. You start in the middle and find the one gap in the outer wall. The rings split into more cells as they get wider, so the passages stay about the same width all the way out.
Can I use these mazes in my classroom?
Yes, print as many as you like for a class, a party or home. Give each student a different maze number if you want to stop copying, and keep the answer key pages for yourself.
Why is there no time estimate?
We have no solid data on how fast people solve mazes, so we do not invent minutes. The page shows what we can measure: the answer path, the forks on it, the dead ends and an estimated walk in squares. On screen, the timer records your own time and your best on each maze stays in this browser.