Skip to content
Shapes and styles

Maze generator with rooms

This maze generator with rooms carves open halls into a normal grid maze. Pick how many rooms you want (up to 12), choose the size, and the preview updates at once. Then download a 300 DPI PNG and a two page PDF with the answer key. The first export each day is free.

By The Mazeloom team (Product and testing). Last updated .

live tool
● live mazeseed mazeloom
900 cells · 81 dead ends · 46 loops
Shape and size
Paths
Look
Page

How to use the maze generator with rooms, step by step

  1. Keep the shape on Square grid, because rooms only fit a grid maze.
  2. Move the Rooms slider to the number of halls you want, from 1 to 12.
  3. Pick a size, then press New maze until you like the layout.
  4. Turn on Show the answer to check the route through the rooms.
  5. Finally, press Download PNG + PDF to get the puzzle and its answer key.

The live preview is always free, and you get one free PNG and PDF export a day. See the pricing page for Pro, $19 once, with clean files and a commercial license, or read how we test every puzzle.

What a maze with rooms looks like

A classic maze is all corridors. Every cell is one step wide, so the eye follows thin lines. Rooms break that rhythm. Each room is an open rectangle of two to six cells on a side, and the corridors run into it from several doors.

That changes how the puzzle plays. In a hall, a solver can cross in any direction, so the room works like a crossroads. As a result, a maze with rooms feels less like a single thread and more like a building with hallways. Game masters like it for that reason, and so do teachers who want a puzzle that looks like a floor plan.

How the maze generator with rooms builds the halls

First, the engine carves a perfect maze, which means there is exactly one path between any two cells. Then it places the rooms. Each room gets a random size and spot, and the engine keeps a one cell gap around it, so two halls never merge into one big blank area.

Next, every wall inside a room comes down. Because a room touches several corridors, this adds a few loops to the maze. The answer key still shows the shortest route, since the solver uses a breadth first search over the finished layout. So the line you see is always the quickest way from the dot to the star.

Small grids have less space, so the tool may place fewer rooms than you ask for. For example, a 10 by 12 grid rarely fits more than four halls. If the preview shows fewer rooms, add columns and rows, or press New maze for a fresh layout.

A maze generator with rooms for dungeon maps

Rooms look best in the Dungeon map style. In that look, the walls are solid blocks, the floor is parchment, and every room floor gets a darker tint with a square grid on top. Each grid square can stand for five feet, just like a tabletop battle map.

In addition, the Block style keeps the solid walls but drops the tint and the grid. That version prints cleanly on a home printer. For a pure line drawing, switch to Classic lines, and the rooms show up as open white space.

When rooms are not the right choice

Rooms make a maze easier to scan, since open space gives the eye a rest. Therefore, a hard puzzle for adults usually works better without them, or with only one or two halls. Circular mazes do not support rooms at all, because the cells there are wedges, not squares.

Room settings in this maze generator

Room settings in this maze generator
SettingValue
Rooms per maze0 to 12
Room size2 to 6 cells on a side, chosen at random
Gap between roomsat least 1 cell
Grid size4 to 80 columns and rows
Downloads300 DPI PNG, answer PNG, two page PDF (SVG with Pro)
built and checked

Maze generator with rooms tested with a real run

We built this maze with the same code the tool on this page uses, with this page's settings and a fixed seed. So the image and the numbers below come from that run, not from a mockup.

PNG + PDF with answer key: real output from the maze generator with rooms test
PNG + PDF with answer key, exactly as the tool builds it
Test input
30 x 30 grid, seed sample-maze-generator-with-
Output
PNG + PDF with answer key
Cells
900
Dead ends
85
Loops
82
Answer length
161 cells
Rooms
6
PDF size
27 KB
Build time
27 ms

How we check mazes: a solver walks every maze before it is saved, and we open each PDF to check the page, the answer key and the print size. More on the about page.

questions

Maze generator with rooms FAQ

How many rooms can a maze have?

Up to 12. The engine tries many spots for each room and skips a room when it would touch another one, so small grids end up with fewer halls.

Do rooms create more than one solution?

They can. A room connects several corridors, so a few loops appear. The answer key always draws the shortest route.

Can I use a maze with rooms as a dungeon map?

Yes. Choose the Dungeon map style for solid walls, a parchment floor and a square grid in every room.

Can I get the same maze again later?

Yes. Write down the seed shown above the preview. The same seed and settings always rebuild the same maze.

Sources and references