Maze Runner

Escape from the top-left corner to the green square before the clock runs out. Every maze is generated fresh and has exactly one route through it, so a wrong turn costs you nothing but the time it takes to walk back.

How to play

You are the red dot, and the green square you are heading for sits diagonally opposite, bottom right.

  1. Move with the arrows Arrow keys, the buttons underneath, or swipe on a touchscreen.
  2. Follow the corridors You cannot pass through walls. A blocked move does nothing.
  3. Watch your trail Squares you have already visited are shaded, so you can see where you have been.
Full instructions
In depth

Navigating a randomly generated maze before the clock runs out

Each press of the new-game button carves a fresh maze with exactly one route from start to finish. This article explains how the mazes are built, how to read the trail you leave behind, and three strategies that reliably get you to the exit faster.

Screenshot: How to play Maze Runner
How to play Maze Runner as it appears when the page opens.

What you see when the game starts

The maze fills a square canvas. Thick lines mark the walls. A red dot in the top-left corner is you. A green square in the bottom-right corner is the exit. Between them is a network of corridors with dead ends, right angles, and long stretches that look promising until they stop.

Above the board, two stats show your progress. Steps counts every move you make. Time left counts down from the moment you start. When you reach the green square, the game tells you how many steps it took and how much time you had left.

How to move

On a computer keyboard, use the arrow keys. Up, down, left, and right do exactly what you would expect. The WASD keys also work: W is up, A is left, S is down, D is right.

On a phone or tablet, swipe in the direction you want to go. There is also a set of arrow buttons below the maze for tapping if you prefer that to swiping.

If you try to move into a wall, nothing happens. The red dot stays put, no step is counted, and a short sound tells you the path is blocked. You cannot break through walls or skip over them.

The trail and why it matters

Every square you step on gets a faint tint behind it. This trail stays visible for the rest of the game. It is your memory made visible.

On a small maze the trail is a nice touch. On a big maze it is essential. Without it, you would walk the same wrong corridor three times without realising. The trail shows you where you have already been, which means every shaded dead end is a dead end you can skip on the way back.

Think of the trail as a map you draw while walking. If you reach a junction and one path is already shaded, take the other one. The shaded path has already been explored and it led nowhere.

Maze sizes and time limits

Easy is an eleven-by-eleven grid with sixty seconds. That is 121 cells and a generous time limit. Most players finish with thirty or more seconds to spare on their first try.

Normal is seventeen by seventeen with ninety seconds. The maze has 289 cells, more than double the easy one. The extra time helps, but not as much as you might hope, because the distance from start to exit is also much longer.

Hard is twenty-five by twenty-five with 150 seconds. That is 625 cells. The corridors are thinner on screen, the dead ends are longer, and making a wrong turn at the start can cost you thirty seconds of walking before you realise. This is where strategy matters.

Why there is always a way out and only one

The maze is carved by a method that visits every cell exactly once, knocking down walls as it goes. The result is what mathematicians call a spanning tree. Every cell can be reached from every other cell, and there is exactly one path between any two points.

For the player, this means two things. First, there is always a route from the red dot to the green square. You will never get a broken maze. Second, there are no loops. If you walk forward and end up where you started, you made a U-turn at some point. You cannot walk in a circle, because no circle exists.

That second property is what makes wall-following work. Since there are no loops, every wall is connected to the outer boundary. Sticking to one wall will trace the entire boundary and eventually bring you to the exit.

The wall-following method

Pick a wall. The left one is traditional. Put your hand on it and never lift it. Walk forward, always keeping that wall on your left. When the corridor turns right, you turn right. When you hit a dead end, you turn around. When a junction offers two paths, you take whichever one keeps the left wall at your side.

This method is guaranteed to reach the exit in any maze with no loops, which is every maze this game generates. The downside is that it does not find the shortest path. It explores every branch that sticks to its chosen wall, including long dead ends far from the exit.

Wall-following is the safety net. Use it when you are disoriented on a hard maze and the clock is ticking. It is slower than intelligent navigation, but it never fails.

A faster approach: aim toward the exit

The exit is always in the bottom-right corner. You start in the top-left. The shortest possible path goes roughly from upper-left to lower-right. Any time you have a choice between going toward the exit and going away from it, lean toward the exit.

This does not mean you should always go right and down. Dead ends force detours, and the correct path often zigs left or up before turning back. But at every junction where multiple unexplored corridors branch off, pick the one that heads closest to the bottom-right corner.

Combine this with the trail. At a three-way junction, one path might be shaded from a previous visit, one might head upward, and one might head down-right. Take the down-right one. It is not always correct, but it is correct more often than chance.

Backtracking without wasting steps

When you hit a dead end, turn around and walk back. The trail will show you the exact path you took, so you do not need to remember it. Walk on the shaded squares until you reach the last junction, then take the unshaded branch.

Each step counts toward your total, even backtracking steps. This means a wrong turn of ten steps costs you twenty: ten to go in and ten to come back. On hard mode, where the solution path might be a hundred steps long, a single twenty-step detour is significant.

The way to reduce backtracking is to look ahead. Before committing to a long corridor, follow it with your eyes. If it curves away from the exit and you can see two or three turns into it, consider the other branch first. Two seconds of looking beats twenty steps of walking.

Common mistakes on the bigger grids

  • Holding down an arrow key. The red dot moves one cell per keypress. If you hold the key, you shoot down a corridor at full speed and sail past a junction you should have taken. Tap deliberately.
  • Ignoring the trail. On a hard maze, you will cross your own path many times. If you are walking on shaded squares without choosing to backtrack, you have gone in a circle and need to reverse.
  • Going up or left for too long. A few steps away from the exit is fine. But if you find yourself near the top-left again, the path you are on is probably a long dead end. Turn back before the clock runs out.
  • Starting without looking. Spend the first three or four seconds scanning the top-left area of the maze. You can often see the first two or three turns and plan a route before you move.
  • Forgetting the direction buttons on mobile. Swiping works, but the on-screen arrows below the maze are more precise. On a crowded screen, a mis-swipe sends you the wrong way.

What makes a good step count

The best possible score is the length of the single correct path from start to exit. On an easy maze that might be 30 to 50 steps. On a hard maze it is typically 100 to 200. Any steps above the shortest path are detours.

A strong run on the hard maze finishes in under 200 steps. That means fewer than 50 wasted steps on wrong turns. If your count is over 300, you are exploring too many dead ends. Try the aim-toward-the-exit strategy to cut that number down.

Every maze is carved on your device

The generation algorithm runs in the page itself. No server sends you a maze, and no server checks your route. A new maze is built from scratch every time you press New game. Your step count, your best score, and your completion time are stored in your browser on that device only. Nothing is uploaded.

Because the maze is generated locally, it works with no internet connection at all. Load the page once, go offline, and every New game still produces a fresh layout.

Help

How to play Maze Runner

You are the red dot, and the green square you are heading for sits diagonally opposite, bottom right. With only one route through, every junction is a straight choice between progress and a dead end you will have to walk back out of, and the clock keeps running while you do.

Move with the arrows

Arrow keys, the buttons underneath, or swipe on a touchscreen.

Follow the corridors

You cannot pass through walls. A blocked move does nothing.

Watch your trail

Squares you have already visited are shaded, so you can see where you have been.

Head for the green square

It is always the bottom-right corner.

Beat the clock

Bigger mazes get more time, but not proportionally more.

Runs on your device

The whole game is played inside this page. Nothing is uploaded, there is no account, and your best score is stored in this browser only. Once the page has loaded it works offline.

Good to know

Keep one hand on a wall

Following the left wall without ever letting go will get you out of any maze like this one, though not by the shortest route.

There is exactly one route

These mazes have no loops, so any dead end is genuinely a dead end. If you are going in circles, you are not — you are retracing.

Use the trail

On the big maze the shaded path is the difference between navigating and guessing. If you are back on a shaded square, back up further.

Every maze is different

A new one is carved each time you press New game, so there is nothing to memorise.

Common questions

Is it free?
Yes — no account, no limit on how many games you play, and no ads inside the game area itself. Ads on the page around it pay for the site.
Does it work on a phone?
Yes. The board scales to your screen and the controls are made big enough to use with a thumb.
Is there always a way out?
Yes, and exactly one. The maze is carved as a tree, so every square is reachable and there is a single route between any two points.
What does the wall-following trick do?
Keeping your left hand on the wall and never lifting it will always get you out of a maze with no loops. It is not the shortest way, but it always works.
What are the shaded squares?
Where you have already been. On the larger mazes they are essential.
Where is my best score kept?
In your browser on this device. It is never sent anywhere and will not follow you to another computer.