# Koch fractal

## World's simplest fractal tool

This utility lets you draw colorful and custom von Koch fractals. We offer you several variations of the Koch fractal – the Koch snowflake, the Koch antisnowflake, and a one-dimensional Koch line. You can set the canvas dimensions (for height and width in pixels) and control the iterative evolution of the fractal. You can set the indents from the frame edges, adjust the drawing line width, and decorate the fractal by picking a trio of color for it, namely the color for the canvas, contour and inner fill. Fun fact – the edge of the snowflake fractal has an infinite length that's bounding a finite area. Created by fractal fans from team Browserling. Fractabulous!

A new project!
we made something new

We just created Online GIF Tools that offers tools for working with GIFs. Check it out!

A link to this tool, including input, options and all chained tools.

Can't convert.

Koch fractal tool
What is a koch fractal?

This online browser-based tool allows you to visualize Koch fractals. The Koch fractal was first discovered by the Swedish mathematician Helge von Koch in 1904. There are three variations of this fractal. Because of its shape, the first type is called a snowflake fractal or a star fractal. It starts from a triangle and evolves outwards. The second type is called an antisnowflake, as it also starts with a triangle, but evolves inwards. The last type is simply called the Koch line as it's formed from a single line. Each line segment in every fractal type is recursively altered, sprouting infinitely many edges in the process. The rule for this process is that each segment is cut into three equal parts and the middle part is folded to create a 60-degree v-shaped wedge. The new shape now consists of four segments, and the same actions are applied for each of the four new segments. With each iteration step, the number of sides of the Koch fractal quadruples, i.e Nₙ = 4×Nₙ₋₁ = 3×4ⁿ⁻¹ (for Koch line type it's 4ⁿ⁻¹), where Nₙ is the number of sides at the nth iteration step. The length of the curve increases by a factor of (4/3)ⁿ⁻¹ each time and the contour of the Koch fractal grows to an infinite length. This also means that it's continuous everywhere but not differentiable anywhere (because it's so spiky). The non-differentiability implies that a tangent can never be drawn at any point. Mind blowing and ingenious at the same time, or as we love to say – fractabulous!

Koch fractal examples
Click to use

Koch Fractal from 48 Segments

In this example, we recurse the fractal for three generations and draw it on a drover color canvas with a size of 500x500px. At depth three, it consists of N₃ = 3×4³⁻¹ = 3×4² = 48 line segments. We use a 9-pixel thick line and fill snowflake with a dodger blue color.

**Required options**

Draw the fractal from a triangle,
with wedges pointing outwards.

Number of recursions.

Space width.

Space height.

Koch fractal's contour width.

Indents from the space border.

Canvas fill color.

Contour color.

Fractal fill color.

Koch Antisnowflake

In this example, we generate an antitriangle Koch fractal (also known as antisnowflake Koch fractal) at the 5th recursion stage. As the wedges are directed inside the triangle, their vertices touch each other, dividing the fractal into small islands that touch but don't overlap. We use a dark-blue canvas of 600x600px size to draw chartreuse color islands with a te-papa-green color line.

**Required options**

Draw the fractal from a triangle,
with wedges pointing inwards.

Number of recursions.

Space width.

Space height.

Koch fractal's contour width.

Indents from the space border.

Canvas fill color.

Contour color.

Fractal fill color.

Koch Line

This example displays a single Koch curve of the fifth order. It stretches the canvas twice horizontally (height is 500 pixels, width is 1000 pixels), sets the padding to 25 pixels and line width to 6 pixels so that you can better see the line. It consists of N₅ = 4⁵⁻¹ = 4⁴ = 256 segments, each having length (3)⁵⁻¹ = (3)⁴ = 81 times less than the initial line.

**Required options**

Drawn the fractal from a
single line.

Number of recursions.

Space width.

Space height.

Koch fractal's contour width.

Indents from the space border.

Canvas fill color.

Contour color.

Fractal fill color.

Slightly Rotated Koch Fractal

In this example, we rotate the fractal so that it stands on two of its feet. This is accomplished by selecting a left drawing direction in the options. The space of the fractal is set to 600 by 500 pixels with a padding of 20px around it. As it's iterated for three steps, there are N₄ = 3×4⁴⁻¹ = 3×4³ = 192 individual lines that create the fractal. We're using the white fill color that makes it look like a snowflake on a lima-green color background.

**Required options**

Draw the fractal from a triangle,
with wedges pointing outwards.

Number of recursions.

Space width.

Space height.

Koch fractal's contour width.

Indents from the space border.

Canvas fill color.

Contour color.

Fractal fill color.

Upside-down Antistar Fractal

In this example, we generate a Koch antistar that's pointing downwards. We use an 800x800 pixels canvas filled with aquamarine-blue color to display seven recursive stages. We set 8-pixel padding and draw a seance-purple color antistar without using an outline.

**Required options**

Draw the fractal from a triangle,
with wedges pointing inwards.

Number of recursions.

Space width.

Space height.

Koch fractal's contour width.

Indents from the space border.

Canvas fill color.

Contour color.

Fractal fill color.

Stage Five Koch Fractal

This example creates an order five Koch fractal with 768 curve segments it in. The formula used to calculate it is N₅ = 3×4⁵⁻¹ = 3×4⁴ = 768. It uses two beautiful colors to illustrate it – cardinal-pink for the area outside of the fractal and gorse-yellow for the area inside.

**Required options**

Draw the fractal from a triangle,
with wedges pointing outwards.

Number of recursions.

Space width.

Space height.

Koch fractal's contour width.

Indents from the space border.

Canvas fill color.

Contour color.

Fractal fill color.

Pro tips
Master online fractal tools

You can pass options to this tool using their codes as query arguments and it will automatically compute output. To get the code of an option, just hover over its icon. Here's how to type it in your browser's address bar. Click to try!

https://onlinefractaltools.com/draw-koch-fractal?&width=500&height=500&iterations=3&background-color=%23fdedaa&line-segment-color=%23024163&fill-color=%231dc3fa&line-width=9&padding=15&direction=up&koch-snowflake=true

All fractal tools

Quickly draw a custom McWorter dendrite fractal.

Quickly draw a custom canopy tree fractal.

Quickly draw a custom Gosper fractal.

Quickly draw a custom Z-order fractal.

Quickly draw a custom Hilbert fractal.

Quickly draw a custom binary v-fractal.

Quickly draw a custom Peano fractal.

Quickly draw a custom Heighway dragon fractal.

Quickly draw a custom twin dragon Heighway fractal.

Quickly draw a custom Heighway nonadragon fractal.

Quickly draw a custom Koch fractal.

Quickly draw a custom triflake fractal.

Quickly draw a custom Sierpinski triangle fractal.

Quickly draw a custom Sierpinski pentagon fractal.

Quickly draw a custom Sierpinski hexagon fractal.

Quickly draw a custom Sierpinski polygon fractal.

Quickly draw a custom Moore fractal.

Quickly draw a custom Cantor comb fractal.

Quickly draw a custom Cantor dust fractal.

Quickly draw a custom Levy fractal curve.

Quickly draw a custom ice fractal.

Quickly draw a custom Pythagoras tree fractal.

Quickly draw a custom t-square fractal.

Quickly draw a custom Hausdorff tree fractal.

Coming soon
These fractal tools are on the way

Generate a Hilbert Sequence

Walk the Hilbert fractal and enumerate its coordinates.

Generate a Peano Sequence

Walk the Peano fractal and enumerate its coordinates.

Generate a Moore Sequence

Walk the Moore fractal and enumerate its coordinates.

Generate a Cantor String

Encode the Cantor set as a string.

Generate a Hilbert String

Encode the Hilbert fractal as a string.

Generate a Peano String

Encode the Peano fractal as a string.

Generate a Moore String

Encode the Moore fractal as a string.

Generate a Dragon String

Encode the Heighway Dragon as a string.

Generate a Sierpinski String

Encode the Sierpinski fractal as a string.

Sierpinski Pyramid

Generate a Sierpinski tetrahedron (tetrix) fractal.

Menger Sponge

Generate a Sierpinski-Menger fractal.

Jerusalem Cube

Generate a Jerusalem cube fractal.

Mosely Snowflake

Generate a Jeaninne Mosely fractal.

Mandelbrot Tree

Generate a Mandelbrot tree fractal.

Barnsey's Tree

Generate a Barnsley's tree fractal.

Barnsey's Fern

Generate a Barnsley's fern fractal.

Binary Fractal Tree

Generate a binary tree fractal.

Ternary Fractal Tree

Generate a ternary tree fractal.

Dragon Fractal Tree

Generate a dragon tree fractal.

De Rham Fractal

Generate a de Rham curve.

Takagi Fractal

Generate a Takagi-Landsberg fractal curve.

Peano Pentagon

Generate a Peano pentagon fractal curve.

Tridendrite Fractal

Generate a tridendrite fractal curve.

McWorter's Pentigree

Generate a Pentigree fractal curve.

McWorter's Lucky Seven

Generate a lucky seven fractal curve.

Eisenstein Fractions

Generate an Eisenstein fractions fractal curve.

Bagula Double V

Generate a Bagula double five fractal curve.

Julia Set

Generate a Julia fractal set.

Mandelbrot Set

Generate a Mandelbrot fractal set.

Toothpick Fractal

Generate a toothpick sequence fractal.

Ulam-Warburton Fractal

Generate an Ulam-Warburton fractal curve.

Subscribe!
Never miss an update

Cool!

Notifications
We'll let you know when we add this tool

Cool!