Maze Generator

Get a different maze every time. Play it on screen or print it out. Every maze has a path to the goal.

Features

  • Make mazes from 5 to 40 cells wide and tall. Each one is different and always solvable
  • Play right away: arrow keys, on-screen arrow buttons, tracing with finger or mouse, or swiping to the next fork
  • Show the answer path, plus your trail and step count
  • Print on one A4 page, with an optional answer page
  • Share or recreate the same maze with a numbered link
  • Save as a PNG image. No sign-up, and it works offline

Use cases

Play time for kids

Start small and make the maze bigger as they get better.

Classroom worksheets

Print the same numbered maze for everyone and keep the answer page for the teacher.

Race friends on the same maze

Send the link and the same maze appears on their screen.

A quick brain break

A 40×40 maze is a real challenge even for adults.

Privacy

Mazes are made in this browser on this device and nothing is sent anywhere. Only the maze size and print settings are saved, in this browser on this device. The maze number goes after the “#” in the page address, which is not sent to the server.

FAQ

Is every maze solvable?

Yes. Mazes are made with a depth-first “recursive backtracker”, which connects every cell and leaves exactly one path between any two cells (a perfect maze). So there is exactly one path from start to goal.

How do I play the same maze again or send it to a friend?

The same size and maze number always give the same maze. Use “Copy link” to send it, or note the number and press “Use this number” later.

What does the printout look like?

One A4 portrait page with the maze and a line for a name. Turn on “Also print the answer page” to add a second page with the answer path drawn in. The paper is always black lines on white, even if the screen is in dark theme.

What size should I choose?

As a rough guide, start young kids at 5×5 to 10×10, move up to 15×15 or 20×20, and try 30×30 or more for adults. On a phone, up to about 20×20 keeps the cells big enough to play comfortably.

Can I play on a phone or tablet?

Yes. Trace from the blue dot with your finger to move, or swipe on the maze to run to the next fork. The on-screen arrow buttons work too. Your finger does not scroll the page while on the maze, so scroll outside it.

Related tools

Start (top left)Goal (bottom right)

Move with the arrow keys or the arrow buttons. You can also trace from the blue dot with your finger or mouse. Swipe on the maze to run to the next fork.

Maze size

The same size and number always give the same maze (1–999999).

Print and save

Prints on one A4 portrait page. Adding the answer page makes two pages.

Size and print settings are saved on this device. The maze number goes into the page address (URL).