BYTETOOLS

Random Dungeon Map Generator

Generate a seeded tabletop dungeon with BSP rooms, L-shaped corridors, doors and stairs, drawn on a square grid with a numbered room key and PNG export.

12
Rooms
31
Doors
555
Open squares
Yes
All rooms reachable

Dungeon map — 48 × 34 squares

Room key

13 × 5 squares at (44, 28)
26 × 3 squares at (40, 1)
312 × 5 squares at (5, 3)
48 × 8 squares at (6, 14)
57 × 5 squares at (1, 28)
65 × 6 squares at (12, 25)
75 × 9 squares at (21, 6)
85 × 10 squares at (29, 3)
93 × 7 squares at (21, 22)
106 × 7 squares at (28, 26)
118 × 6 squares at (39, 8)
1210 × 4 squares at (36, 22)

The map is built by binary space partitioning: the whole rectangle is cut in two, each half is cut again, and so on to the split depth you choose. A room is then dropped inside each final partition. Because partitions never overlap, the rooms cannot either — no matter what the seed rolls. Sibling partitions are then joined by an L-shaped corridor between their room centres, working up the tree, which is what guarantees the whole dungeon stays connected.

Every corridor square that touches exactly one room becomes a door, and the entrance and exit are placed in the two rooms furthest apart so the map has a route to run. The reachability check above is a real flood fill over the finished grid, not a promise. Everything is generated in your browser and the PNG is saved straight to your device.

What is the Random Dungeon Map Generator?

This generator builds a random dungeon map for tabletop games. It uses binary space partitioning: the whole rectangle is cut in two, each half is cut again, and so on to the split depth you choose, with a room dropped inside each final partition.

  • BSP room placement that can never produce overlapping rooms
  • L-shaped corridors that keep every room reachable, verified by flood fill
  • Automatic door placement where corridors meet rooms
  • Entry and exit markers in the two rooms furthest apart
  • Parchment, blueprint and black-and-white styles with an optional square grid
  • Numbered room key plus PNG export at twice the on-screen size

How to use the Random Dungeon Map Generator

  1. 1

    Set the map width and height in squares, and the split depth for more or fewer rooms.

  2. 2

    Press New for a different dungeon, or type a seed to rebuild a specific one.

  3. 3

    Adjust the square size in pixels and pick a parchment, blueprint or black-and-white style.

  4. 4

    Toggle the square grid and the room numbers to suit how you will use the map.

  5. 5

    Download the PNG at double resolution, and copy the room key for your notes.

About the Random Dungeon Map Generator

This generator builds a random dungeon map for tabletop games. It uses binary space partitioning: the whole rectangle is cut in two, each half is cut again, and so on to the split depth you choose, with a room dropped inside each final partition. Because partitions never overlap, neither can the rooms — no matter what the seed rolls.

Sibling partitions are then joined by L-shaped corridors running between their room centres, working up the tree, which is what guarantees the whole dungeon stays connected. Every corridor square that touches exactly one room becomes a door, and the entrance and exit are placed in the two rooms furthest apart so the map has a route worth running.

The reachability figure in the stats is a real flood fill over the finished grid rather than a promise. Change the seed to roll a new dungeon, or keep it to rebuild the same one exactly. Everything is generated and drawn in your browser, and the PNG is saved straight to your device.

Frequently asked questions

What is binary space partitioning in map generation?

It is a technique that repeatedly splits a rectangle into two smaller ones, forming a tree. Rooms go in the leaves and corridors connect siblings back up the tree. Because the partitions tile the space without overlapping, the rooms inside them cannot collide.

How do I make sure every room in a dungeon is reachable?

Connect siblings at every level of the partition tree, not just the leaves. That builds connectivity from the bottom up until the root joins the two halves. This tool then runs a flood fill over the finished grid and reports the result honestly.

Can I recreate the same dungeon map later?

Yes. The map is a pure function of the seed, the width, the height and the split depth. Note those four values and you will get a pixel-identical map next time, on any device.

What split depth should I use?

Depth 3 gives a handful of large rooms suited to a short session, while depth 5 or 6 packs in many smaller ones for a proper crawl. The rooms count in the stats row updates immediately, so try a couple of values and see what fits.

Can I use these dungeon maps in my own game?

Yes. The maps are generated by you in your own browser and the PNG is yours to use in home games, published adventures or virtual tabletops. Nothing is uploaded and no account or attribution is required.

Related tools