Generate a Sierpinski Triangle
Draw the Sierpinski triangle fractal at a chosen recursion depth
Last updated: September 17, 2026
Depth 0 is one triangle. Maximum depth 8 (6561 triangles).
Examples:
- Depth 0 → one filled triangle
- Depth 1 → three triangles
- Depth 4 → 81 triangles (classic gasket look)
Result actions
Copy or download the tool output, or share a link to Generate a Sierpinski Triangle.
Get new tools in your inbox
An occasional email when we ship new free tools. No spam, unsubscribe anytime.
Related tools
Visualize an L-System
Expand and draw Lindenmayer systems with turtle graphics
Draw Pascal's Triangle
Generate Pascal's triangle with binomial coefficients for any row count
Generate a Hilbert Curve
Draw a Hilbert space-filling curve for a chosen order
Calculate Number Sum
Paste a list of numbers and get the sum, count, and average
Generate Look and Say Sequence
Generate Conway's look-and-say sequence from any digit seed
Generate Pi Digits
Generate any number of digits of π with high precision
What is a Sierpinski Triangle?
The Sierpinski triangle (or gasket) is a fractal formed by repeatedly removing the central inverted triangle from an equilateral triangle. Each step replaces one triangle with three smaller ones.
Why Generate It?
- Education: Show recursion and self-similarity
- Math demos: Connect combinatorics, geometry, and fractals
- Art: Produce clean geometric patterns quickly
How This Tool Works
Pick a depth. Depth 0 draws one triangle; each deeper level subdivides every remaining triangle into three. Drawing happens on a canvas in your browser.
Related Tools
- Visualize an L-System: Turtle-graphics fractals
- Draw Pascal's Triangle: Binomial coefficient arrays
- Generate Random Matrix: Random numeric grids