Skip to the main content
Pinch of Decoration

Maze Generator

Generate a real maze with exactly one path from start to finish, at the size and difficulty you choose.

How the maze is made

The maze is carved with a randomised depth-first search, which produces a perfect maze: every cell is reachable, and there is exactly one route between any two points with no loops and no unreachable pockets. Harder settings then use a longer, more winding route between the entrance and the exit and remove the dead giveaway of a short diagonal run.

Sizes to start from

Easy
Around 10x10 with wide corridors - right for ages 4 to 6.
Medium
Around 18x18, the usual activity-book size.
Hard
28x28 or larger, with long dead ends. Adults will need a few minutes.

Solving it on screen

A maze can be shared as a link and solved in a browser as well as printed. Drag from the entrance to trace a route, and drag back over your own trail to rub it out. The trail can never cross a wall, however fast the drag - so a wobbly finger costs nothing.

Arrow keys work too, and there is an on-screen direction pad for phones, where the squares in a large maze are smaller than a fingertip. A hint shows the next few steps from wherever you have got to, including out of a dead end. When you reach the exit it tells you how your route compared with the shortest way through.

Questions people ask

Is there always a solution?

Always. The algorithm cannot produce an unsolvable maze, and the solution page traces the exact route.

Can I move the start and finish?

Yes - top to bottom, left to right, or corner to corner.

Does the maze need a word list?

No. It is the one tool here that does not use your content, though you can still give it a title and instructions.

Can the maze be played online?

Yes. Choose Play Online to get a link that works on a phone, a tablet or an interactive whiteboard, with no app and no account at either end.