A maze generator for screens and paper: play with a finger, print with an answer page, share by number

Mazes are one of the few activities that work equally well for a small child on a tablet and an adult on a lunch break. The Maze Generator on Omikuji Tools makes a new one each time, from 5×5 to 40×40 cells. You can play it on screen right away or print it on one A4 sheet with an answer page. It is free, needs no sign-up and works offline.

Every maze has exactly one path

The FAQ explains how the mazes are built. A depth-first "recursive backtracker" connects every cell and leaves exactly one path between any two cells, which is called a perfect maze. So every maze is solvable, and there is exactly one route from the start at the top left to the goal at the bottom right.

Columns and rows are set separately, from 5 to 40 each. The page gives a rough guide: start young children 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.

Playing on a screen

There are several ways to move, so it suits a keyboard, a mouse or a small finger:

  • Arrow keys on a keyboard, or the on-screen arrow buttons.
  • Tracing from the blue dot with a finger or the mouse.
  • Swiping on the maze, which runs along the corridor to the next fork.

While your finger is on the maze, the page does not scroll, so a swipe always moves the player rather than the page. To scroll, touch outside the maze. The tool shows your trail and counts your steps, and when you reach the goal it tells you how many steps it took. "Show answer" draws the solution path, "Restart" puts you back at the start, and "New maze" makes another.

There is also support for screen readers. After each move, the page announces your position and which directions are open, such as "Column 3, row 5. Open: up, right", and says "Wall." when a move is blocked. There is also a button to switch between light and dark themes.

Printing worksheets

Print gives 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. You can also save the maze as a PNG image; while the answer is shown, the button changes to "Save PNG (with answer)" and the image includes the solution path.

For a classroom this is the useful part: print the same maze for everyone, and keep the answer page for the teacher.

The same maze again, by number

Each maze has a number. The same size and the same number always give the same maze, with numbers from 1 to 999,999. Note the number and press "Use this number" later to bring it back, or press "Copy link" to send it. That makes small races possible: send the link, and the same maze appears on a friend's screen.

Privacy

Mazes are generated in the browser on your device, and nothing is sent anywhere. Only the maze size and print settings are saved, in this browser. The maze number goes after the # in the page address, and that part of a URL is not sent to the server.

👉 Maze Generator — free and no sign-up. More games and lottery tools are on the Omikuji Tools top page.

Comments

Popular posts from this blog

Amidakuji (Ghost Leg) maker: a fair random pairing tool for up to 200 people, entirely in the browser

Diffing text and moving tables around, without pasting either into a server

omikuji.dev: free browser-based tools, puzzle games and reference sites made in Japan