MAZEGEN

Free Maze Generator & Image-to-Maze Tool






Room:
You:





100%
Workspace Controls
Pinch or Ctrl/Cmd + Scroll to zoom
Click & Drag or use Arrows to pan
Press Arrows to move player
Buy Me A Coffee
Navigation
File
Maze
Image
Text
Reset
P2P
Help

Request Config From...
    Match Lobby
    Join Room
    Room Chat
    Room Chat
    ☰
    Background Removal Studio
    Note: Auto mode may not work on some mobile devices without AI acceleration.
    Original
    Original
    Result
    Result

    This feature is experimental and may be changed or removed.

    This feature is experimental and may be changed or removed.

    Depth Refinement
    Mask Refinement
    Image Filters
    Before
    Before filters
    After
    After filters
    Image Tuning
    Color Channels
    Image Placement
    100%

    Drag to pan · Scroll or +/− to zoom

    Maze Size & Shape
    Canvas dimensions (px)

    Uncheck Auto to set exact canvas size. Grid is then defined in Cell size tab.

    Define grid by

    Canvas is split into cells of this size; cols and rows are derived and force-fit (no remainder).

    Cell size is derived from canvas dimensions ÷ rows/columns; canvas = cols×w by rows×w.

    Maze Shape / Cutout
    Mask Type
    Image Source

    Use a black/white or transparent image. White/transparent areas define the maze area.

    Shape Options

    Inverted: maze in center, solid outside. Normal: maze follows shape, solid outside shape.

    Endpoints & reserved space
    Reserved space & path
    Set start and finish by clicking canvas
    Color & style
    Walls
    Background
    Colors
    Wall
    Cell / Path
    Outside Mask
    Custom
    Reserved Areas
    Start
    Finish
    Player
    Player
    Trace
    Background Mode

    Uses the pattern image, aligned with placement settings.

    Pattern Blend Settings
    Edges
    Active pattern
    Blended
    Blended result
    Processed
    Preview
    vs
    Original
    Comparison preview 1
    Processed
    Comparison preview 2
    Before
    After
    Original
    Processed

    Weights use a soft curve so lower values still have visible effect.

    Text Editor
    Text Editor
    Click a layer in the canvas or list to select it
    Drag to move, corner handles to scale, top handle to rotate
    Double-click a layer row to edit its text
    Use ↑↓ in each layer row to reorder
    Settings toggle reveals font, color and effect options
    100%

    Tap to pick color
    Edges Settings
    Edge Detection
    Edge detection
    Processed Mask
    Processed mask
    Thresholds

    Dark/Light work best in the middle of the range for a gradual effect.

    Refinement
    Dots Settings
    Tone Pattern
    Tone pattern
    Processed Mask
    Processed mask
    Thresholds
    Pattern Controls
    Refinement
    Lines Settings
    Lines Pattern
    Lines pattern
    Processed Mask
    Processed mask
    Thresholds
    Line Properties

    Min width should be ≤ max width; spacing controls line density.

    Refinement
    Export Maze as Image
    92%
    100%
    0
    0
    0
    Custom Mask Editor
    ⋮⋮
    Paint to remove/restore. Scroll/pinch to zoom. Use Pan tool (mobile) or hold Space/Alt and drag (desktop) to pan. Hold Shift for straight lines.
    Maze Generator — Help
    On this page
    Quick Start Maze Settings Image Text Play Mode Solve Tips & Troubleshooting Shortcuts

    Quick Start

    Load an image, tune the pattern, then regenerate for the best results.
    Quick Start overview
    Main navigation and workspace overview.
    1. File: import/export, save, and load settings.
    2. Maze: Maze Size & Shape, Endpoints & reserved space, and Color & style (background, walls, cells).
    3. Image: upload, filters, placement, and background removal.
    4. Text: add and style text layers.
    5. Reset: use master reset actions.
    6. Help: open this guide; menu also has Flash Start / End and Patch notes (timeline of updates).
    7. Play: enter play mode.
    8. Zoom controls: zoom 10%–500%, or reset zoom to fit.
    9. Maze output: the generated maze preview.

    Maze Settings

    Maze Size & Shape

    One modal with tabs: Canvas, Cell size, Shape. Switching tabs does not trigger regeneration.

    1. Preset: grid/canvas presets (e.g. Fine detail, 15×15, Auto fit viewport, Print ready); save/load icons export or import this section as JSON.
    2. Canvas tab: Auto (fit viewport) or manual Width (px) and Height (px) (32–4096).
    3. Cell size tab: Define grid by Cell size (cell size in px, wall thickness) or Rows & columns (rows, cols).
    4. Cell size (px): 4–200 when defining by cell size.
    5. Rows & columns
    6. Wall thickness: 1–4; in Cell size tab.
    7. Shape tab: enable custom shape cutout; mask type (shape or pattern image), radius, fit mode, invert; area outside the shape uses the color set in Color & style → Outside mask.

    Endpoints & reserved space

    1. Reserved space size: padding (px) around start/finish.
    2. Min path length: factor to encourage longer routes.
    3. Start/finish: automated or select on canvas, then Confirm in the floating panel. Flash via Help → Flash Start / End.

    Color & style

    Wall and background presets; colors for walls, cells/path, and outside mask; reserved area colors; background mode (Solid, Mirrored, Custom Image).

    1. Wall color & opacity: maze line color and transparency.
    2. Background preset: e.g. Outline No Color, Colorized; save/load icons for JSON.
    3. Cell / Path color & opacity: base fill behind the maze.
    4. Outside mask: color for area outside the maze shape (Black, White, Transparent, or Custom).
    5. Background mode: Solid (color only), Mirrored (pattern image), or Custom Image (separate upload, scale/pan).
    6. Treat white as transparent: white pixels in pattern (and mirrored background) become transparent.

    Image

    Image menu opens: Blend Settings, Filters, Placement, and Background removal (and upload/image gallery from the toolbar).

    Blend Settings (pattern)

    1. Preset: combination or strength presets (e.g. Outline only, Balanced, High Detail).
    2. Preview: active pattern thumbnail and blended result; gear icon opens Edges/Dots/Lines settings.
    3. Blend mode: Probability Union, Any, Any 2, or All.
    4. Edges, Dots, Lines: toggle each source and set weight (0–100).
    5. Pattern intensity: 0–100 overall strength.
    6. Max cluster area: limit size of blocked regions (pattern blend).

    Filters

    1. Preset: start from a filter preset.
    2. Before/After: filter preview comparison.
    3. Basic adjustments: brightness, contrast, saturation.
    4. Color channels: RGB channel balance.
    5. Blur: apply a Gaussian blur to the image.
    6. Invert: toggle color inversion.

    Placement

    1. Preview: placement preview.
    2. Maintain aspect ratio: preserve proportions.
    3. Scale & pan: size and alignment controls.

    Background Removal

    1. Original: original image preview.
    2. Result: masked preview.
    3. View masks: inspect generated masks.
    4. Auto mode: AI-driven background removal.
    5. Manual mode: manual mask edits.
    6. Custom mask editor: open the editor.

    Text

    Layer-based text editor: workspace preview (left) and sidebar with layers and settings (right). Double-click text on the canvas to edit inline. Text layers take priority over the image pattern in the maze.

    Layers & workspace

    1. Add layer: toolbar + button creates a new text layer.
    2. Layer list: click a layer to select it; use duplicate, delete, show/hide, and up/down arrows on each row.
    3. Workspace: drag to move, corner handles to scale, top handle to rotate; double-click to edit text inline.
    4. Snap to grid and Live preview: checkboxes below the layer list; live preview regenerates the maze as you edit.

    Settings (tabs: Font, Layout, Color)

    1. Layer text: textarea for the active layer (or edit on canvas).
    2. Font tab: font source (Local / Google), font, style, size (8–600 px).
    3. Layout tab: position X/Y, scale, letter spacing (tracking), line height, rotation, Max Cluster (hollow text).
    4. Color tab: Fill and Stroke color (with dropper to pick from maze), stroke width, Mask Tol (white = path mask).

    Play Mode

    • ▶ Play: enter play mode.
    • D-pad: move through the maze (draggable).
    • Start/Finish: blue square is start, target is finish.

    Solve

    • Solve: finds and shows solution paths.

    Tips & Troubleshooting

    • Performance: increase Cell Size, reduce blur, or avoid very large images.
    • Mask issues: try Auto Mode again or refine with Manual Mode / custom mask editor.
    • Alignment: use Placement scale/pan to align the pattern.

    Shortcuts

    • Mask editor pan: hold Space or Alt and drag (desktop).
    • Straight strokes: hold Shift while painting.
    • Close dialogs: Esc.
    Maze could not be made solvable

    The maze could not be generated with a solvable path after 3 attempts.

    Try one of these:

    • Move start and end points closer together
    • Try a different shape mask or disable the shape mask
    • Increase the maze grid size (more rows/columns or smaller cell size)
    Patch notes

    Summary of recent updates.

    February 2026

    Solvability & orphan cells

    • Orphan bridging: Single O(n) pass after mask application eliminates unblocked cells with no flat-side neighbor — either unblocks one cardinal neighbor to bridge or re-blocks the orphan so mazes stay solvable.
    • Reachable endpoints: Manual start/finish snap to the nearest reachable cell (at least one unblocked cardinal neighbor); findNearestUnblocked in generation also requires a reachable neighbor so endpoints never land on isolated cells.
    • If 3 regeneration attempts still fail, an alert modal suggests fixes (move endpoints, change mask, increase grid size).

    Feature gating & grid stats

    • Max playable rows/columns: Tracked after mask application; Image and Text menus (and their Reset buttons) disable when either max is under 50 cells, with tooltips explaining why.
    • Centralized updateFeatureGating() combines grid-size and image-upload checks; disabled buttons show guidance (e.g. “Requires at least 50 cells…” or “Upload an image first”).

    Performance — BFS & neighbors

    • isSolvable BFS: ring-buffer index instead of q.shift(), inlined 4-direction traversal — no per-cell array allocations.
    • getAllNeighborCoords: Reusable scratch buffer instead of .map(); findClosestEdgeCell uses squared distance (no Math.sqrt).
    • nearestReachableCell: Inlined cardinal checks with NEIGHBOR_OFFSETS instead of getAllNeighborCoords per cell.

    Text Editor — Color Dropper

    • Color dropper to pick fill or stroke from the maze canvas.
    • Custom canvas-snapshot approach (no EyeDropper API) for broad browser support.
    • Full-screen overlay shows maze snapshot; tap or click to sample pixel color; applied color updates the active layer’s fill or stroke.
    • Dropper buttons (eyedropper icon) next to Fill and Stroke in the Color tab.
    • Live loupe magnifier (11×11 region) with correct coordinate mapping for object-fit: contain.
    • Mobile-friendly: loupe offset for touch, large cancel button, touch-action: none on overlay.

    Performance — Debounced maze regeneration

    • scheduleRegen now debounces with a 200ms window — rapid input changes batch into a single regen.
    • Added scheduleRegenImmediate for callers that need instant regen (presets, resets, modal applies).
    • Text editor inputs: stopPropagation on both input and change events in bindInspector prevents double-regen when Live mode is on.
    • Opt-in timing instrumentation (window._mazeDebugTiming) for text mask rendering and cluster-breaking.

    Text Editor — Max cluster / hollow text

    • Per-layer Max Cluster setting: randomized walker carves paths through text clusters exceeding the threshold.
    • Enables hollow/playable text effects — maze paths run inside large letterforms.
    • Cluster-breaking isolated to text-blocked cells only; non-text blocked areas are preserved.

    Text Editor — Tabbed settings & streamlined properties

    • Tabbed interface (Font, Layout, Color) using existing tab pattern; removed shadow, blend, opacity, align controls — alignment hardcoded to center.
    • Per-layer text color renders in the maze via per-pixel color map; white fill acts as path mask (bubble/outline effects).
    • Configurable white mask tolerance (Mask Tol) per layer.
    • Two-pass stroke rendering (stroke first, fill second) for clean perimeter outline.

    Text Editor — Full redesign

    • Layer-based WYSIWYG text editor: two-pane layout (workspace + inspector), full layer CRUD, drag/scale/rotate on canvas.
    • Font, style, size, tracking, fill/stroke, max cluster, white mask tolerance; hybrid local + Google Fonts; font size 8–600px.
    • Text layers take priority over image pattern bias; aspect-correct text buffers; snap-to-grid and live preview.
    • Double-click to edit inline (textarea overlay); color dropper for fill/stroke from maze.

    Placement modal, maze settings, flash & cell rendering

    • Placement: Live Preview runs full regen; auto-disables on modal close; Apply hides while Live Preview is on.
    • Maze Size: Canvas / Cell size / Shape tabs are UI-only (no regen on switch); Shape Fit default Fit inside; outside-mask single color picker.
    • Flash: Overlay redraw throttled; overlapping flash loops prevented; redundant trace() removed.

    Maze generation & bug fixes

    • Wall removal: Random vertical openings and dead-end breaker scale with grid size (e.g. small grids get proportionally lower removal).
    • Fixed text rasterizer var redeclaration; text mask aspect-correct buffers; malformed scrollbar selectors; placement live preview state; generator.js var causing SyntaxError; mobile play button; cell size (px) and change-only inputs after number-stepper event restore.
    • Number stepper component and resizable sidebar/workspace splitter (matchMedia-aware on mobile).

    Endpoint confirmation panel

    • Confirm / Try again: Moved out of the Endpoints modal into a small floating panel that appears near your selected cell (above, below, or beside the teal preview based on canvas quadrant).
    • Endpoints modal: Stays closed while you pick a cell and confirm; re-opens only after you click Confirm or the panel’s X. Try again keeps you in selection mode without re-opening the modal.
    • Panel: Header with X (same as other modals); Confirm and Try again buttons in a compact panel positioned to avoid overlapping the preview or going off-screen.

    Shape mask & endpoints

    • Manual start/finish: With shape mask and pattern image, manually selected start/finish cells are no longer moved to the mask edge; your selection is kept.
    • Negative space: Clicking outside the maze area (e.g. in the black area around a heart shape) to set start/finish is now rejected with a message instead of being accepted.

    Custom maze dimensions & cell size control

    • Custom dimensions: Set canvas width and height directly for full control over maze size (e.g. 900×600).
    • Cell size or row/column counts: Maze Size & Shape lets you choose between specifying cell size (px) or row and column counts; switch depending on whether you want fixed cell pixels or a fixed grid resolution.
    • More precise control over cell size and grid density for different export and layout needs.

    Endpoints, canvas selection & color/style

    • Endpoints: Place start/finish by clicking the canvas and confirming, or use automated placement.
    • Canvas selection fix: "Select start/finish on canvas" now aligns correctly when using manual canvas dimensions (e.g. 900×600).
    • Color & Style: Walls and Cells & background merged into one section; wall thickness moved to Maze Size & Shape → Cell size. Switching between Wall color, Cell/path color, and Outside mask tabs no longer triggers maze regeneration.

    Start/End flash, zoom 10–500%, preset save/upload

    • Start/end flash: Green and gold pulsing rings highlight start and finish after generation or via Help → Flash Start / End.
    • Zoom: Range expanded to 10%–500%.
    • Start/end defaults: Top-left and bottom-right by default; reset to corners on page load, when mask is turned off, or when invert mask is turned on.
    • Preset save/upload: Each preset dropdown (Maze size, Endpoints, Background, Wall, Filters, Blend, Edges, Dots, Lines) has Save and Load icons to export/import that section’s settings as JSON.

    Pattern mask, shape masks, solvability

    • Pattern image mask: Uses background-removal mask directly for clean boundaries.
    • Shape masks: Circle, heart, hexagon, etc. fixed; work regardless of background removal.
    • Closed cells: Disconnected regions are bridged so mazes are fully traversable.
    • Start/end in mask: Start and end are forced inside mask bounds; waypoints constrained to mask.
    • Solvability: Guaranteed solvable mazes; emergency path carving when needed.
    • Shape size: Slider maximum increased (up to 1000%).
    Help Item Details
    Preview
    Preview
    100%
    Filters: None
    Mask Previews
    Mask preview
    100%
    Original
    Image Gallery
    Astronaut
    Astronaut
    Barn Owl Storybook
    Barn Owl Storybook
    Bunny Carrots Illustration
    Bunny Carrots Illustration
    Deep Sea Diver Doodle
    Deep Sea Diver Doodle
    Dog Backpack Storybook
    Dog Backpack Storybook
    Dolphin
    Dolphin
    Duckling Boat Storybook
    Duckling Boat Storybook
    Fantasy Castle
    Fantasy Castle
    Fantasy Stag Storybook
    Fantasy Stag Storybook
    Floating Island
    Floating Island
    Fox Symmetry Doodle
    Fox Symmetry Doodle
    Frog Lilypad Storybook
    Frog Lilypad Storybook
    Futuristic Explorer Doodle 2
    Futuristic Explorer Doodle 2
    Futuristic Explorer Doodle 3
    Futuristic Explorer Doodle 3
    Futuristic Explorer Doodle
    Futuristic Explorer Doodle
    Haunted House Storybook
    Haunted House Storybook
    Haunted House
    Haunted House
    Hedgehog Reading Illustration
    Hedgehog Reading Illustration
    Horse Storybook
    Horse Storybook
    Horse
    Horse
    Hummingbird Illustration 2
    Hummingbird Illustration 2
    Hummingbird Illustration 3
    Hummingbird Illustration 3
    Hummingbird Illustration
    Hummingbird Illustration
    Hummingbird Storybook 2
    Hummingbird Storybook 2
    Hummingbird Storybook
    Hummingbird Storybook
    Hummingbird
    Hummingbird
    Ice Dragon Illustration
    Ice Dragon Illustration
    Ice Dragon
    Ice Dragon
    Koala Heart Illustration
    Koala Heart Illustration
    Koala Heart Storybook 2
    Koala Heart Storybook 2
    Koala Heart Storybook
    Koala Heart Storybook
    Koala Heart
    Koala Heart
    Lighthouse Doodle
    Lighthouse Doodle
    Lighthouse Photo
    Lighthouse Photo
    Lighthouse Storybook
    Lighthouse Storybook
    Lighthouse
    Lighthouse
    Lion Cub Star
    Lion Cub Star
    Lion
    Lion
    Observatory Tower
    Observatory Tower
    Owl Blocks Storybook
    Owl Blocks Storybook
    Owl Pie Storybook
    Owl Pie Storybook
    Owl Prism Illustration
    Owl Prism Illustration
    Owl Prism Storybook
    Owl Prism Storybook
    Panda Bamboo Doodle
    Panda Bamboo Doodle
    Panda Bamboo
    Panda Bamboo
    Parrot Puzzle Photo 2
    Parrot Puzzle Photo 2
    Parrot Puzzle Photo
    Parrot Puzzle Photo
    Parrot Puzzle Storybook 2
    Parrot Puzzle Storybook 2
    Parrot Puzzle Storybook
    Parrot Puzzle Storybook
    Parrot Puzzle
    Parrot Puzzle
    Phoenix
    Phoenix
    Polar Bear
    Polar Bear
    Puppy Rings Storybook
    Puppy Rings Storybook
    Raccoon Circuit
    Raccoon Circuit
    Raccoon Palette Storybook 2
    Raccoon Palette Storybook 2
    Raccoon Palette Storybook
    Raccoon Palette Storybook
    Raccoon Scientist Illustration
    Raccoon Scientist Illustration
    Red Fox
    Red Fox
    Robot Doodle
    Robot Doodle
    Robot Recycling Storybook
    Robot Recycling Storybook
    Robot Teacher Doodle
    Robot Teacher Doodle
    Robot
    Robot
    Robotic Owl
    Robotic Owl
    Sea Turtle
    Sea Turtle
    Snow Owl Illustration 2
    Snow Owl Illustration 2
    Snow Owl Illustration
    Snow Owl Illustration
    Snow Owl Photo
    Snow Owl Photo
    Snow Owl Storybook
    Snow Owl Storybook
    Snow Owl
    Snow Owl
    Squirrel Acorn Doodle
    Squirrel Acorn Doodle
    Squirrel Acorn Storybook
    Squirrel Acorn Storybook
    Stag
    Stag
    Wizard Cat Illustration
    Wizard Cat Illustration
    Wizard Cat
    Wizard Cat
    Woman At The Beach
    Woman At The Beach
    Maze Samples

    No maze samples available yet. Check back soon!

    About & Features Privacy Policy Terms of Use Disclaimer Privacy Settings