Hexaflake Fractal Generator
A hexagonal fractal formed by subdividing hexagons. Customize and download as PNG.
Pick an iteration depth, a color, and a canvas size — then hit Convert to render a hexaflake fractal as a downloadable PNG. Each iteration subdivides hexagons into seven smaller copies, so you go from a simple shape to thousands of nested hexagons in one click. And everything runs in your browser. Nothing gets uploaded.
How It Works
The generator starts with one large hexagon at the center of the canvas. At each iteration, it replaces that hexagon with seven smaller copies — one in the center and six arranged around it. This self-similar pattern repeats down to the iteration depth you chose. The Canvas API draws each tiny hexagon as a filled polygon, and the result is a single raster image you can copy or download.
Examples
Quick Desktop Wallpaper
You need a clean geometric background for your laptop. Two minutes, done.
Iterations: 5
Color: #6366f1
Size: 19201920×1920 PNG
Indigo hexaflake
~2,801 hexagonsMath Class Handout
A teacher wants to show students how iteration depth changes fractal complexity. Three renders side by side tell the whole story.
Iteration 2: 7 sub-hexagons
Iteration 4: 2,401 sub-hexagons
Iteration 6: 117,649 sub-hexagons
Color: #1e293b / Size: 8003 separate PNGs at 800×800
Clearly shows exponential
growth in detail per levelLaser-Cut Coaster Design
A maker wants a fractal pattern to trace in a vector editor and send to a laser cutter. Low iteration keeps the geometry simple enough to cut cleanly.
Iterations: 3
Color: #000000
Size: 20002000×2000 black hexaflake
Clean edges for tracing
~343 hexagons totalWho Uses This
Generate geometric patterns for backgrounds, posters, and textile prints without touching code.
Show students self-similarity and recursion with a visual they can actually see change in real time.
Export high-res PNGs to trace for laser cutting, 3D printing templates, or CNC engraving.
Grab a quick fractal asset for a demo, presentation, or generative art project.
Common Mistakes
Each level multiplies the hexagon count by 7. Going past 6 or 7 iterations can freeze your browser tab for a while. Start at 4–5, then bump up if your machine handles it.
If you pick light gray on a white canvas, the fractal is basically invisible. Switch to a darker or more saturated color, or change your theme to dark mode first.
A 600px image looks fine on screen but prints blurry on paper. Set the size to 1500–2000 for anything you plan to print or cut.
Technical Details
- Processing: 100% client-side (Canvas API)
- Browser Support: Chrome, Firefox, Safari, Edge
- Max Canvas Size: 2000 × 2000 pixels
- Export Format: PNG (white background)
- Iteration Range: 1–10 (6+ may be slow on older hardware)
Frequently Asked Questions
What exactly is a hexaflake fractal?
A hexaflake is a fractal built from hexagons. You start with one hexagon, then replace it with seven smaller hexagons — one at the center and six around it. Repeat that process at every scale and you get an infinitely self-similar snowflake-like shape. It’s closely related to the Sierpiński hexagon.
How many iterations should I use?
For most screens, 4 to 5 iterations looks great and renders in under a second. Going to 6 adds a lot of detail on large canvases. Past 7, you’re mainly stress-testing your browser — the added detail is smaller than a pixel at normal zoom.
Can I change the background color?
The background matches your current theme. Toggle dark mode with the moon/sun icon in the header and the fractal re-renders on the new background automatically. If you need a specific hex color behind the fractal, download the PNG and layer it in any image editor.
Is the output vector or raster?
Raster — it’s a PNG rendered on an HTML Canvas element. If you need true vector output (SVG), you can trace the PNG in Inkscape or Illustrator. For most uses, setting the canvas to 2000px gives you plenty of resolution.
Does this tool send my data anywhere?
No. The fractal is drawn entirely in your browser with JavaScript and the Canvas API. Nothing gets uploaded, no server is involved, and your settings aren’t stored anywhere unless you bookmark or screenshot the result yourself.