
This is a free online Sierpinski triangle generator. Choose how many times the triangle is divided, pick the colors, and download the result as a PNG image with a transparent background, ready to print or to use in a project.
The Sierpinski triangle is the simplest fractal to describe: take a triangle, cut out the triangle formed by the middles of its sides, and repeat forever on the three triangles that are left. The result is a shape made of three copies of itself, each one half the size — the definition of self similarity.
This tool can draw it in two completely different ways that arrive at exactly the same picture: by dividing the triangle step by step, and by playing the chaos game, which places millions of random points and lets the fractal appear on its own.
Everything runs directly in your browser. No image is uploaded to a server, and nothing needs to be installed.
Use the mouse wheel over the image to zoom in and out, and drag the image to move it. On a phone, use one finger to move the image and two fingers to zoom. The checkered squares show the transparent areas of the image: they are not part of the downloaded PNG file.
| Field | Description |
|---|---|
| How it is drawn | "Divide the triangle" builds the fractal exactly, drawing every small triangle. "Chaos game" places random points that slowly reveal the same shape. |
| Number of divisions | How many times each triangle is divided into three. The number of triangles is 3 raised to this number, so it grows very quickly. |
| Number of points | Only used by the chaos game: how many random points are placed. More points make the fractal look denser and reveal smaller details. |
| Zoom, Rotation, Margin | How the fractal is framed inside the image. The margin is the empty space left around the drawing, in pixels. |
| Coloring | One flat color, or a gradient between two colors that follows the height of each triangle inside the drawing. |
| Fill the shape | Draws solid triangles. Turn it off to draw only the outlines, which gives a wireframe look and lets the background show through. |
| Line thickness | The thickness of the outlines, in pixels, when the shape is not filled. |
| Transparent background | Leaves the background of the PNG transparent, so the fractal can be placed over any image or color. |
| Resolution / Width / Height | The size of the generated image, in pixels. |
Start with a filled triangle. Mark the middle point of each of its three sides, and remove the triangle they form in the center. Three smaller triangles are left, each one half as wide as the original. Do the same to each of them, and then to each of the nine that result, and so on forever. What remains after infinitely many steps is the Sierpinski triangle.
It was described by the Polish mathematician Wacław Sierpiński in 1915, although the same pattern appears in Italian church floors from the 13th century, six hundred years before anyone called it a fractal.
Two numbers describe how strange the shape is. Its area is zero: at every step three quarters of the remaining area survives, and (3/4)n goes to zero. Its perimeter is infinite: at every step the total length of the borders is multiplied by 3/2, and that grows without limit. A shape with no area and an endless border does not fit the usual idea of a curve or a surface, and that is exactly why fractal geometry needed a new kind of dimension.
The fractal dimension of the Sierpinski triangle is log 3 / log 2 ≈ 1.585. The reason is simple: the shape is made of 3 copies of itself, each scaled by 1/2. A line made of 2 copies at half size has dimension 1, a square made of 4 copies at half size has dimension 2, and this shape sits between them.
The second drawing method looks like it cannot possibly work. Mark the three corners of a triangle and pick any starting point. Then repeat this, forever:
The dots are placed in a completely unpredictable order, and yet after a few thousand of them the Sierpinski triangle appears — and no dot ever lands in a hole. The reason is that the halving step can never take you into a removed region: the three "jump to a corner and halve" rules are precisely the three copies that build the fractal, so the set of points they can reach is the fractal. The random choices only decide the order in which the picture fills in.
This is the same mechanism behind the Barnsley fern, which uses four transforms instead of three, chosen with different probabilities.
Yes, this tool is 100% free and works directly in your browser, with no installation and no sign-up required.
Are the images uploaded to a server?No. The fractal is drawn by your own browser and the image never leaves your computer.
Can I use the generated images in my own projects?Yes. The images come from a geometric rule, and you can use them in websites, posters, worksheets, games, printed material and anywhere else.
Can I download it with a transparent background?Yes. Turn on "Transparent background" and the PNG will have no background at all, so you can place the triangle over any color or image.
Which drawing method should I use?Use "Divide the triangle" when you want a clean, exact image, especially for printing. Use the chaos game when you want the grainy texture of random points, or when you want to show how the fractal emerges from randomness.
Why do the smallest triangles disappear when I raise the divisions?Because they become smaller than one pixel. Either raise the resolution of the image, or zoom in with the mouse wheel to look at one part of the fractal closely.
What is the area of the Sierpinski triangle?Zero. Each step keeps three quarters of the area of the previous one, and repeating that forever leaves nothing. The perimeter, on the other hand, grows by half at every step and becomes infinite.
What is its fractal dimension?log 3 / log 2, which is about 1.585. It is made of 3 copies of itself at half the size, which puts it between a line (dimension 1) and a filled surface (dimension 2).
Is the Sierpinski triangle related to Pascal's triangle?Yes, and the connection is beautiful: colour every odd number in Pascal's triangle and leave the even ones blank, and the Sierpinski triangle appears. The same pattern also shows up in the Rule 90 cellular automaton.
Where can I see other fractals?Try the Koch Snowflake Generator, the Dragon Curve Generator, the Barnsley Fern Generator and the Mandelbrot Set Generator.





