Rectangular Maze Generator

Build square and rectangular mazes on a four-neighbor grid. This page keeps the live generator and adds structural notes that the homepage only summarizes.

Inside this maze

Difficulty labels are approximate. Seeds use Mulberry32 (not cryptographic). Generation time is measured on this device. The domain name is not the topic of the site.

Grid model

Cell identifier: cellId = row × columns + column, zero-indexed. North exists when row > 0, south when row < rows − 1, west when column > 0, east when column < columns − 1. East and west never wrap to the other side of the row.

Limits

Minimum 5 × 5. Maximum 100 × 100. Hard cap 10,000 cells. Wilson’s algorithm on large boards runs in a Web Worker; cancel discards incomplete results. The site does not silently shrink a request.

Practical examples

  • Small: 7 × 7 Very Easy, DFS, seed 101 (First Steps).
  • Medium: 20 × 20 Classic Square, DFS, seed 505. Expected 400 cells and 399 internal passages when perfect.
  • Large: 60 × 60 Expert Workshop, DFS, seed 1212. Solution length is measured after generation; a large grid can still have a relatively short route.

Perfect and braided

Perfect mode is a spanning tree. Braiding processes a percentage of initially identified dead ends. That percentage is a processing target, not a guaranteed elimination rate. Cycle count = E − V + 1. Display-only colors never rebuild topology.

Circular generator · Hexagonal generator · Creation guide