Free online maze generator
Generate a random maze in one click, then actually play it. MazeWalker is a free online maze generator and game — create a perfect maze, then solve it in 2D or 3D, on your own or racing friends.
Generate a maze in seconds
Pick a size and MazeWalker builds a brand-new maze instantly. Every maze is a perfect maze: there's exactly one route between any two points, so there are no loops, dead pockets, or unreachable cells — just one true path from the entrance to the exit. Bigger grids produce longer, twistier solutions.
- One-click generationCreate a fresh random maze instantly, as many times as you like.
- 9×9 to 31×31Scale difficulty from a quick warm-up to a serious labyrinth.
- 2D & 3D playSolve top-down, or step inside in first- or third-person 3D.
- Race friendsSend a link and see who escapes first in real time.
How the maze generator works
MazeWalker generates mazes with an iterative recursive backtracker(a depth-first search). It starts with a full grid of walls, then carves a winding path by repeatedly stepping into an unvisited neighbor and knocking down the wall between, backtracking whenever it hits a dead end. The result is a classic perfect maze with long corridors and plenty of branching dead ends. Learn more in our guide to how maze generators work.
Turn a maze photo into a playable maze
Already have a maze? Upload a photo or screenshot and MazeWalker scans it into a playable grid using computer vision — Otsu thresholding, grid-pitch detection, and thin/thick wall classification — so you can walk a maze from a puzzle book, a worksheet, or anywhere else. Then jump straight into solving it.
Frequently asked questions
- Is the maze generator free?
- Yes. MazeWalker's maze generator is completely free, runs in your browser, and needs no account or download.
- What algorithm does the maze generator use?
- It uses an iterative recursive backtracker (a depth-first search). This produces a 'perfect maze' — there is exactly one path between any two cells, with no loops and no isolated areas.
- What maze sizes can I generate?
- You can generate mazes from a small 9×9 grid up to a challenging 31×31 grid. Larger grids mean longer, harder solutions.
- Can I turn a picture of a maze into a playable maze?
- Yes. Upload a photo or screenshot of a maze and MazeWalker scans it into a playable grid using computer vision, then you can walk it in 2D or 3D.