Free · runs in your browser · nothing is uploaded

3D Maze Generator

Pick a maze style and how many cells across and down, set the path width and wall height, and download a watertight STL of the maze on a base plate. Every maze has exactly one solution, shown in red. It is free, unlimited and runs in your browser.

Loading the maze generator...

How to make a 3D printable maze

  1. 1

    Pick the maze

    Choose long winding paths or many short branches, and whether the maze has an entrance and exit or a hole at the finish for a ball. Set how many cells across and down.

  2. 2

    Get a new maze

    Press New maze until you like one. Each maze has a number: type the same number again and you get the same maze back.

  3. 3

    Set the print size

    Type the path width, wall thickness, wall height and base plate in millimetres. The print size updates as you type.

  4. 4

    Download

    Press Download STL and open it in your slicer, or download a PNG or SVG to print the maze on paper or cut it.

Maze generator settings

What each setting does and the range it accepts.

Maze styleLong winding paths uses a recursive backtracker (depth-first search), which makes long corridors and fewer dead ends. Many short branches uses randomized Prim's algorithm, which makes lots of short dead ends.
Start and finishEntrance + exit opens the outer wall at the top left and the bottom right. Ball maze keeps the outside closed and cuts a hole through the base at the finish, so the ball drops out when you solve it.
Cells3 to 60 across and 3 to 60 down. More cells make a harder maze and a bigger print.
Maze number1 to 999999. The same number with the same style and cell count always gives the same maze.
Path width2 to 40 mm, the open space between walls. For a ball maze, make it about 1 to 2 mm wider than the ball.
Wall thickness0.4 to 20 mm. Use 0.8 mm or more (two lines of a 0.4 mm nozzle) so the walls print solid.
Wall height and baseWalls 0.4 to 60 mm tall on a base plate of 0 to 20 mm. A base of 0 gives loose walls with no floor, for example to glue on a board.
OutputBinary STL in millimetres, one closed watertight part, flat on the bed. PNG (black on white) and SVG (in mm), with or without the red solution line.

How the maze is made

Every maze here is a perfect maze: there is exactly one path between any two cells, no loops and no closed-off areas, so it always has one solution. The solution is found by a breadth-first search and drawn in red in the preview, and in the PNG and SVG if you want it. It is never part of the STL.

The maze is built on a grid. Each cell is a square of path, and the walls sit on the lines between cells, so all paths have the same width and the print looks clean from above.

Long winding paths or many short branches?

The recursive backtracker walks forward until it gets stuck, then backs up to the last place it can turn. That gives long corridors that wind around the whole maze, and the solution is usually long. It is a good choice for a ball maze or a desk toy.

Prim's algorithm grows the maze outward from one cell in random directions. That gives many short side branches and dead ends close to the solution path, which looks busier and confuses the eye on a paper puzzle.

Printing tips

Print the maze flat with the base on the bed. Walls go straight up, so no supports are needed. A 0.2 mm layer height works for most sizes.

For a ball maze, make the path about 1 to 2 mm wider than the ball and the walls taller than half the ball, and cover the top with a clear plate or print a lid so the ball stays inside. A small bearing ball or a marble works well.

To print a gift with a surprise, use a two-color print: change the filament at the top of the base so the walls stand out.

Want to print something else?

Turn a photo or a short text prompt into a 3D model with AI, or make a stencil or a gyroid lattice with the free generators.

More free 3D tools

3D maze generator FAQ

Pick the maze style and number of cells on this page, set the path width and wall height, and press Download STL. It is free, needs no signup and runs in your browser.
Yes. Every maze is a perfect maze with exactly one path between any two points, so there is always one solution. Tick Show the solution to see it.
Yes. Each maze has a number. Type the same number with the same style and cell count and you get the same maze. The number is also in the file name.
Choose Ball maze. The outside stays closed and there is a hole through the base at the finish. Make the path a little wider than the ball and cover the top with a clear lid.
Yes. The base and the walls are one closed surface with every edge shared by two triangles, so slicers read it as a solid part.
Yes. Download the PNG to print it, or the SVG for a laser cutter, vinyl cutter or a design program. Both can include the solution line.