Maze & Dungeon Generator
Create deterministic maze layouts via recursive backtracking, cave networks via cellular automata, or dungeon layouts via random room placement. Output ASCII maps with walls (#) and floors (.). Perfect for roguelike prototypes and game design.
Also known as: labyrinth · dungeon crawl
seeded
Presets
Output
About this tool, tips & examples
What it does
The Maze & Dungeon Generator produces ASCII maps in three classic
procedural styles: mazes carved by recursive backtracking, cave
systems grown with cellular automata, and dungeon floors built from
randomly placed connected rooms. Maps run from 5×5 up to 61×61, drawn
with # walls and . floors, and every layout regenerates exactly from
its seed.
Common use cases
- Roguelike development — drop-in test levels while building movement, field-of-view, and pathfinding.
- Tabletop maps — an instant dungeon floor to sketch a session around; print the ASCII or redraw it.
- Teaching procedural generation — three canonical algorithms, observable side by side on demand.
- Pathfinding fixtures — seeded maps make A*/BFS tests deterministic.
Settings
- Type — maze (perfect corridors), cave (organic blobs), or dungeon (rooms + connections); presets for each.
- Width / Height — 5 to 61 cells each.
- Seed — the same seed, type, and size always regenerate the identical map — share the seed to share the level.
Privacy note
Maps are generated locally in your browser and never uploaded. Output is deterministic procedural content for games and teaching.
FAQ
What do the algorithms actually do? Recursive backtracking walks a grid depth-first, carving passages — a “perfect” maze with exactly one path between any two points. Cellular automata start from noise and smooth it into organic caves. The dungeon placer drops rooms and connects them with corridors.
Are mazes always solvable? Yes — backtracking guarantees full connectivity. Caves and dungeons produce well-connected playable layouts.
How do I use the output in code?
Parse the ASCII grid (# = wall, . = floor) or take the JSON export.
Seeded generation means your test levels never shift under you.