The tool you need, ready to use

Maze Generator

Pick a shape, size and path style and the maze is made at once. Solve it on screen with the arrow keys or your finger, show the solution line, or watch how the maze was carved. Solution length, dead ends and decision points put a number on the difficulty, and you can print with a solution page or save as PNG or SVG. The same number always brings back the same maze.

Last updated 2026-10-22All math stays in your browser

Press Solve it yourself, or press an arrow key on the board, to start moving from the start. Move one cell at a time with the arrow keys or W, A, S, D, or drag with a finger or the mouse.

Solution length
Dead ends
Decisions on the solution
Places where you must choose a path
Maze number

Dead-end share: compared with the average for each path style in the same shape

Quick picks
Shape
cells
cells

Path style
Start and finish
Print and save

Last updated 2026-10-22Your inputs are not stored

ROBERIN standardThe tool you need,
ready to use.
  • Clear at a glanceInputs and results sit where you expect them.
  • Result firstThe key number comes first; the working only when you need it.
  • Ask lessNo sign-up and no unnecessary details.

The maze generator builds a maze with exactly one solution, in the shape, size and path style you choose

This tool makes square, circular and hexagonal mazes. Square mazes run from 4 to 80 cells on each side, hexagonal ones from 4 to 50, and circular ones from 3 to 40 rings around a center cell. Every maze it produces is a perfect maze. By the definition used by maze researcher Walter Pullen, a perfect maze has no detached walls and no unreachable areas, and there is exactly one route from any cell to any other. So the solution from start to finish is unique too.

Once a maze is made, you can solve it right on screen. Press Solve it, move with the arrow keys or your finger, and the tool records your time and step count, then compares them with the shortest path when you finish. You can also show the solution line, replay how the maze was carved, and read figures such as solution length, dead ends and decision points. A maze you like can be printed on US Letter paper with a solution page, saved as PNG or SVG, or reopened later from a link that carries its number.

When it pays to make your own maze

Mazes found online usually come in a fixed size and difficulty, and often with no answer key. Making your own lets you fit the maze to the person and the place.

  • Worksheets for kids: give a first-timer a big 8-cell maze, and a child who is warmed up a 16-cell or circular one. Print the solution page too and a grown-up can check the answer at a glance.
  • The whole class on one maze: share the copied link or the number printed at the bottom of the page, and everyone gets the same maze. It is easy to compare who finished first and who took the shorter route.
  • A quick mental break: solve it on screen with no paper, and keep track of time and steps. Solve the same maze again and see how much your record drops.
  • Rough maps for games and board games: save as SVG, change the line width and color in an editor, and lay artwork over the cells to use as a map base.
  • Learning the algorithms: press Watch it build and the order in which walls come down plays back exactly. You can see how differently the three methods fill a board of the same size.

How to use it

  1. Under Quick picks, press Kids, Normal, Hard, Insane, Circle or Hex, or set the shape and size yourself. The maze is redrawn as soon as you change a setting.
  2. Choose a path style. Long winding gives long, twisting paths, Short branches gives many short dead ends, and Uniform sits in between.
  3. Set the start and finish. Corners runs from top left to bottom right (outside to center for circular mazes). Farthest apart uses the two outer cells that are farthest apart measured along the paths as entrance and exit. Distance follows the paths, not a straight line, so the entrance and exit can sometimes end up on either side of a single wall.
  4. Press New maze for a different maze with the same settings. Read the solution length and dead-end count in the figures below to gauge the difficulty.
  5. Solve it on screen with Solve it, or send it out with Print, PNG, SVG or Copy link. Turn on the Solution switch to draw the answer path.

How the three path styles differ

All three knock down one wall between cells at a time until every cell is joined by exactly one route. The difference is the order in which the next wall is chosen, and that order gives the maze its grain.

  • Long winding (recursive backtracker): keep digging into an unvisited neighbor, and when stuck, back up and open another branch. Pullen describes this as producing the longest winding corridors, with few dead ends but long ones, and a solution that is usually very long and twisty.
  • Short branches (modified Prim): pick one of the cells on the edge of the area built so far at random and attach it. The maze grows evenly in all directions from the start cell, so, as Pullen describes, it has many short dead ends and a fairly straight solution.
  • Uniform (Wilson): walk randomly from an empty cell, and when the walk reaches the built area, attach the path with its loops erased. David Wilson published the method in 1996. It picks every perfect maze that can be made on the board with exactly the same probability, so use it when you want a maze that leans toward no particular texture.
Average of 400 square 30 × 30 mazes (corner start and finish, measured with this tool)
Path styleDead endsSolution lengthDecisions on the solutionDead ends in Pullen's table
Long winding10.2%231 cells (25.7%)21.910%
Uniform29.0%100 cells (11.2%)48.229%
Short branches35.2%66 cells (7.4%)42.036%

The dead-end shares come out almost the same as the values Pullen tabulates for square mazes (recursive backtracker 10%, Wilson 29%, modified Prim 36%). The column worth a closer look is decisions on the solution: the number of places along the solution where you had to pick one of two or more branches. Long winding has the longest solution but the fewest choices to make, while Uniform has a shorter solution and more than twice as many choices. Which one feels harder differs from person to person, so read the figures together when you choose.

What sets the difficulty

There is no standard that boils maze difficulty down to one number. These four things do change how hard a maze feels.

  • Size: more cells means a longer solution and more dead ends. It is the surest way to make a maze harder.
  • Dead ends: paths you enter and have to back out of. Short dead ends are spotted quickly, but a long one only shows you were wrong after you have gone a long way.
  • Decisions on the solution: how many times you must choose a branch while following the answer. The higher the count, the more chances to take a wrong turn.
  • Start and finish positions: Farthest apart uses the two outer cells that are farthest apart along the paths as entrance and exit, which makes the solution longer.

The scale under the figures shows the dead-end share of the current maze beside the average for each path style in the same shape. Those averages come from 400 mazes per path style made with this tool: square 30 × 30, hexagonal 24 × 24 and circular 15 rings.

Average dead-end share by shape (start and finish cells excluded, 400 each)
ShapeLong windingUniformShort branches
Square 30 × 3010.2%29.0%35.2%
Hexagonal 24 × 2410.9%32.0%40.1%
Circular 15 rings10.5%29.5%36.2%

Square, circular and hexagonal mazes

A square maze is the familiar shape, where each cell has four neighbors: up, down, left and right. It prints well and suits pencil. Width and height can be set separately, so you can make a tall, narrow maze to fit a portrait page.

A circular maze is what Pullen's glossary calls a theta maze: the passages run along concentric circles, and the start or finish is usually at the center. The outer rings are longer, so leaving the cell count unchanged would make the outer cells far too wide. Like the approach in Jamis Buck's Mazes for Programmers, this tool subdivides the cells ring by ring. It takes the width one cell of the previous ring occupies along the inner edge of this ring, divides it by the ring thickness and rounds, and splits the cell into that many parts, so from ring 2 onward, a ring where that width is more than 1.5 times the thickness gets twice as many cells (the first ring around the center cell splits it into 6). That is why a 10-ring maze has, from the center out, 1, 6, 12, 24, 24, 24, 48, 48, 48, 48, 48 cells per ring, 331 cells in all.

A hexagonal maze gives each cell six neighbors, so there are more places for branches to form, and the paths run diagonally, which reads differently from a square maze. Even with the same path style, the dead-end share for Uniform and Short branches comes out a little higher than for square, as the table above shows.

How to solve a maze

The wall follower (right-hand rule) means walking with one hand on the wall and never lifting it. Pullen notes that it does not find the shortest route, and that it fails outright when the goal is in the middle and a closed loop of passage surrounds it. The mazes from this tool are perfect mazes with no detached walls, so no such loop exists. Even the center goal of a circular maze is reached eventually by following the wall, but you walk into and out of every dead end, so it takes a long time.

Dead-end filling suits paper mazes. Find a dead end, fill in its passage back to the nearest junction, then fill in the new dead ends that appear, and repeat until only the solution is left. Pullen writes that in a perfect maze this always finds the one solution. It works best on mazes with many short dead ends, such as Short branches.

The step count in Solve it includes every step you take back. If you arrive with a count equal to the shortest path (solution length − 1), you never took a wrong turn. The path you have walked stays as a faint line, and stepping back onto a cell you came from erases that line.

Printing and saving

Press Print and the maze is set up as one US Letter portrait page with 12 mm margins. A line for name and date sits at the top, and the maze number and the address that reopens it are printed at the bottom. With Also print the solution page switched on, the second page shows the same maze with the answer path drawn. A square maze fills the full width of the paper, so the side of one cell is as follows.

Cell side of a square maze printed on US Letter portrait (12 mm margins, 191.9 mm print width)
Cells acrossCell sideGood for
8 cellsabout 20.9 mm (0.82 in)First-timers, crayons and thick markers
16 cellsabout 11.2 mm (0.44 in)Pencil worksheets
30 cellsabout 6.2 mm (0.24 in)Adults with a fine pen
60 cellsabout 3.1 mm (0.12 in)A long challenge
80 cellsabout 2.4 mm (0.09 in)Printing from SVG on large paper

The PNG is a white-background image about 2,400 pixels on its long side, ready to drop into a document or a chat. The SVG stores the lines themselves, so it never gets blurry however far you enlarge it, and you can change line width and color in an editor. A saved file keeps whatever solution display is on screen, so to save a puzzle copy and an answer copy, save once with the Solution switch off and once with it on.

Common mistakes

  • Same number, different maze: a number gives the same maze only when shape, size and path style are the same. If you wrote down just the number, note the settings too, or use Copy link, which carries them.
  • Thinking that moving the start and finish changes the maze: they do not change the walls, only where the entrance and exit are. Choosing Farthest apart on the same maze makes the solution longer.
  • Choosing difficulty by dead-end count alone: Short branches has the most dead ends but the shortest solution. Read it together with the number of decisions on the solution.
  • The answer ended up on the puzzle picture: PNG and SVG saves follow the state of the Solution switch. Printing keeps the answer off the first page and puts it only on the second page you turned on.
  • Trying to solve a big maze on a phone: a 60-cell maze drawn on a 360-pixel screen gives cells under 6 pixels. Full screen barely helps on a phone because the width stays the same, so make mazes you will solve on screen 30 cells or smaller (about 10 pixels per cell).

Limits

  • It does not make mazes with loops (braid mazes), passages that cross over and under like bridges, or multi-level mazes. Every maze is a perfect maze with one solution.
  • The shapes are square, circular and hexagonal only. There is no way to cut the outline into a picture shape such as a heart or a letter.
  • A maze number is a 32-bit seed from 0 to about 4.3 billion, and the random numbers come from a game-grade pseudo-random generator (mulberry32). Do not use it for drawings or security, where the result must be unpredictable.
  • The same number gives the same maze only for the way this tool generates mazes today. If the generation method is changed, the same link could show a different maze, so save any maze you must keep as PNG or SVG.
  • Printed size and margins can vary with the browser's print settings (scale and paper). Leave the scale at 100% or the default.
  • The time in Solve it is measured from your first step, and the step count includes steps you took back.

Sources

As of Pullen's algorithm table and glossary, the bibliographic details of Wilson's paper and the information on Buck's book were checked against the originals on October 22, 2026. The averages in the tables were measured the same day by making 400 mazes per path style with this tool, and the printed cell size is the print width divided by (cells across + 1.2), with the print width taken for US Letter.

Frequently asked questions

Can I make the same maze again?

Yes. Every maze has a number, and when the shape, size and path style match, the same number always gives the same maze. Copy link copies an address holding these settings and the number, and the number and address are also printed at the bottom of the paper. The start and finish positions do not change the maze itself, only where the entrance and exit are.

Can a maze have more than one solution?

No. The mazes this tool makes are perfect mazes with no loops in the paths, so there is exactly one route from any cell to any other. That means the solution from start to finish is unique too, and the solution line shows exactly that route.

How do the three path styles differ?

Long winding has few dead ends, but its paths curve for a long way and the solution is long. Short branches has many short dead ends and a fairly straight solution. Uniform picks every possible maze with equal probability, feels somewhere between the two, and had the most places on the solution where you must choose a path.

Can I solve these mazes with the right-hand rule?

Yes. Following a wall with one hand fails when a loop of passage surrounds a goal in the middle, but the mazes here have no such loops, so you reach even the center of a circular maze. It is not a way to find the shortest route, though, and you will walk in and out of dead ends many times.

What settings suit kids?

For a first try, start with Kids under Quick picks (8 × 8, Short branches). The cells are big enough to follow with a pencil and the solution is short. Once they are comfortable, raise the size to 12-16 cells or try Circle. If you leave the solution page on when printing, the answer comes out on the second page.

How big are the cells when printed?

Printed on US Letter portrait with 12 mm margins, the side of a square maze cell is roughly 191.9 mm ÷ (cells across + 1.2). That is about 11.2 mm for 16 cells, 6.2 mm for 30 cells and 3.1 mm for 60 cells. For pencil, 30 cells or fewer is comfortable.

It will not move well when I solve on my phone.

After pressing Solve it, drag a finger over the maze and the marker follows the passages toward your finger without crossing walls. If your finger is on the other side of a wall, the marker stops where it can get no closer, so at each fork move your finger along the passage you want. On a phone, full screen barely enlarges the cells because the width stays the same, so mazes of 30 cells or fewer are easier to solve on screen.

Should I save as PNG or SVG?

PNG is handy for dropping straight into a document or chat. At about 2,400 pixels on the long side, the lines stay sharp even on a full printed page. Use SVG to print on large paper or to change line width and color in an editor, since it is stored as lines and never goes blurry however far you enlarge it. If you save with the solution on, the solution line is included.