Dungeon Generator
Build roguelike dungeons with rooms, traps and treasure.
How to use the Dungeon Generator
- 1Set the dungeon size, room count and corridor style.
- 2Add traps, treasure and doors, and pick a map style.
- 3Print the map or export it as PNG or JSON for your game.
About Dungeon Generator
The Dungeon Generator builds roguelike and tabletop dungeon maps with three generators: scattered rooms, BSP (binary space partitioning, which splits the area into evenly spread rooms) and caves carved by a cellular automaton. Set the grid from 30 to 120 cells wide and 20 to 90 cells high, the number of rooms, the smallest and largest room size, straight or winding corridors and how many extra loops connect the layout.
Doors can be ordinary, locked or secret, and a density slider spreads monsters, treasure and traps through the rooms, with stairs marking the entrance and exit. Every room gets a name and a short description in a numbered room key that you can copy. Map styles include classic blue, parchment, dark and an ink style made for printing, with an optional grid and room numbers. Hiding the secret doors turns the map into a player handout.
Dungeon masters print these maps for D&D sessions, and game developers use the JSON export, which stores the tile grid as one string per row along with rooms, doors and features, as a starting point for levels. The same seed and settings always give the same dungeon.
Frequently asked questions
What is BSP dungeon generation?
Binary space partitioning repeatedly splits the map into two smaller areas until they reach a target size, places a room in each area and connects neighbors with corridors. The result is evenly spread rooms that never overlap.
How are cave maps generated?
Cave mode starts from random noise and applies a cellular automaton: a cell turns to rock when most of the cells around it are rock. A few passes smooth the noise into organic caverns, which are then split into numbered areas.
How big is one grid square?
The JSON export uses 5 feet per cell, the usual scale of tabletop battle maps, so a dungeon 30 cells wide spans 150 feet.
Can I import the dungeon into my own game?
Yes. The JSON file lists the tiles as one text row per line (# rock, . room floor, comma for corridor, + door, L locked door, S secret door) plus room rectangles, descriptions and feature positions, which is easy to parse in any engine.
More in Worldbuilding & RPG
Find names for fantasy characters, companies, pets and projects.
Generate islands with mountains, rivers and named cities.
Roll genre, hero, conflict and twist into a fresh story prompt.