AbraCalc

Maze — Random Maze Generator & Navigator

Navigate a randomly generated maze from start to finish using arrow keys or on-screen buttons.

Find the exit! Use arrow keys or buttons below.
Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). Maze — Random Maze Generator & Navigator [Online calculator]. Retrieved from https://abracalc.com/game/maze/

BibTeX

@misc{abracalc-maze, author = {AbraCalc}, title = {Maze — Random Maze Generator & Navigator}, year = {2026}, howpublished = {\url{https://abracalc.com/game/maze/}} }

Did this tool answer your question?

How to play

  1. Use the arrow keys (or WASD) to move the blue dot through the maze.
  2. You can also tap the on-screen direction buttons on mobile.
  3. Start is the green cell (top-left area); exit is the door icon (right edge).
  4. Find a path from start to exit — every maze is randomly generated and solvable.

Navigate the blue dot through a randomly generated maze to the door exit. Use arrow keys (WASD also works) or the on-screen direction buttons. Each game is a unique maze.

How it works

The Maze tool generates a unique random maze each session and invites you to navigate from the marked start to the marked finish. You can move using the keyboard arrow keys or by tapping the on-screen directional buttons on touch devices. Walls block your path and you must backtrack when you reach a dead end.

Mazes are generated using algorithms such as recursive backtracking or Prim's algorithm, which guarantees that every generated maze has exactly one solution path with no isolated islands. This means a solution always exists, but the path may be long and winding.

The most reliable solving strategy is the right-hand rule: keep your right hand touching the right wall at all times and follow it. This guarantees you will reach the exit in any simply connected maze. If the maze has loops, a systematic depth-first approach works well: always go straight, then turn right, then left, and only backtrack when completely stuck.

Use this tool for a quick focus-building brain break, to demonstrate maze-solving algorithms visually, or as a relaxing spatial navigation exercise.

Worked example

Solve a maze using the right-hand rule

  1. At the start, place your (virtual) right hand on the right wall.
  2. Move forward as long as the path ahead is open.
  3. When you hit a wall, turn so your right hand stays on the wall — this means turning right when possible, otherwise straight, otherwise left.
  4. Continue following the right wall without ever lifting your hand from it.
  5. The rule guarantees you reach the exit in a perfect maze without retracing the same dead end twice.

Exit reached by following a systematic wall-following strategy.

Common mistakes to avoid

  • Wandering randomly and revisiting the same corridors — always keep track of which passages you have already explored.
  • Giving up after hitting a few dead ends — dead ends are normal and expected; systematic backtracking always leads to progress.
  • Trying to solve the maze visually from above instead of navigating step by step, which is much harder on complex generated mazes.

Key terms

Perfect maze
A maze with exactly one path between any two points — no loops and no isolated sections.
Dead end
A corridor with only one opening; you must reverse direction to escape it.
Right-hand rule
A maze-solving strategy where you keep the right wall in contact at all times to guarantee finding the exit in a perfect maze.

Frequently asked questions

How is the maze generated?
Using recursive backtracking — a depth-first search that carves paths through a grid of walls, guaranteeing a fully connected, solvable maze.
Can I use WASD?
Yes — WASD works in addition to the arrow keys.