EditSafely

Generate a Sierpinski Maze

Draw a Sierpinski maze fractal. Runs entirely in your browser, so your data never leaves your device.

Output

The result appears here as you type.

Options

How to use Generate a Sierpinski Maze

  1. 1. Set the recursion depth. Choose Depth for how many nested levels of square corridors the maze contains, following the same 3x3 subdivision pattern as the Sierpinski carpet.
  2. 2. Size the canvas. Set Width (px) and Height (px) to fit the nested corridor outlines, keeping the canvas square to match the underlying carpet subdivision at every level.
  3. 3. Pick colors and line width. Choose Line color, Background color and Line width to keep the nested square outlines legible, especially important at higher depths where corridors get narrow.
  4. 4. Review the rendered maze. The tool traces the holes of the Sierpinski carpet as nested square corridor outlines, drawn as an SVG line drawing. Save it once the depth and detail level look right.

When to use Generate a Sierpinski Maze

Generate a Sierpinski Maze draws the outline of the holes in a Sierpinski carpet as nested square corridors, turning the carpet's removal pattern into a maze-like line drawing. It bridges the fractal geometry of the carpet with the visual language of a labyrinth puzzle.

  • Showing the Sierpinski carpet as line art instead of fill. Rendering the carpet's holes as outlines rather than filled squares gives a completely different visual read, useful when comparing fill-based and outline-based fractal presentations.
  • Designing a fractal-themed puzzle or coloring page. The nested square corridors resemble a maze, making this a novel base for a math-themed puzzle sheet that is also structurally a genuine fractal rather than a hand-drawn maze.
  • Illustrating self-similarity in maze-like structures. A lecture on fractal boundaries can use this to show that even a structure that visually resembles a maze can arise from strict recursive rules rather than random generation.
  • Producing a distinctive decorative line pattern. The nested square outlines make an unusual repeating motif for a rug, tile or textile design, generated at a chosen depth for the desired level of intricacy.

Examples

A depth-4 Sierpinski maze

Output

An SVG line drawing of nested square corridors tracing the holes of the Sierpinski carpet.

About the Generate a Sierpinski Maze tool

Generate a Sierpinski Maze is a free online tool that works entirely inside your web browser. Draw a Sierpinski maze fractal. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 234 Math utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with 6 settings, including Depth, Width (px), Height (px) and Line color, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.

Frequently asked questions

Does Generate a Sierpinski Maze cost anything?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Does the generator send anything to a server?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How do I get a different result?

Run the generator again. Each run is computed fresh on your device, and any options you change are applied to the next result immediately.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

Can I save what the tool produces?

Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.

Related tools

All Math Tools