Skip to main content
CalcChef

SVG Wave Generator

Make an SVG wave divider for the top or bottom of a section: set points, amplitude, curve bend, size and color, then copy the SVG or download SVG or PNG. How it works

Use the SVG Wave Generator

Viewport

Layer 1 is in front and uses the color and seed above. Each layer behind it has its own seed, and the colors blend from the back color to the front color.

Wave position
SVG Output
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320" preserveAspectRatio="none">
  <path fill="#007bff" fill-opacity="1" d="M0,320 L0,270 Q 240,272.52 480,300.02 Q 720,292.79 960,303.25 Q 1200,295.23 1440,284.95 L1440,320 Z"></path>
</svg>

Presets

About the SVG Wave Generator

An SVG wave divider is a single path inside a viewBox, so it stretches to the width of its section. The default wave (Hero size 1440 × 320, 3 points, amplitude 50, bend 0.5, seed 0) is 249 characters of SVG, and a 12-point wave at the same size is 469. Set the points, amplitude, curve bend, edge, size and color, add up to four layers behind the front wave, then copy the SVG or download wave.svg or wave.png.

Viewport sizes and where the wave starts at amplitude 50 and 150

ViewportSizeStarts above the edge at amplitude 50Starts above the edge at amplitude 150
Hero1440 × 32050150
Card800 × 12020.661.9
Mobile375 × 8013.841.3
Tall1440 × 60050150
Divider1440 × 16027.582.5

In SVG units, bottom edge, 3 points. The amplitude is scaled down on short viewports (never below 5), so the same setting gives a gentler wave on Card and Mobile.

Length of the SVG by number of points

PointsCharacters in the SVG (Hero, amplitude 50, seed 0)
2225
3249
6322
12469

The whole SVG element as copied, with the color #007bff. Each extra point adds one Q segment of about 24 characters, since every coordinate is rounded to 2 decimals.

How to use this tool

  1. Choose a size: Hero 1440 × 320, Card 800 × 120, Mobile 375 × 80, Tall 1440 × 600, Divider 1440 × 160, or Custom (width 1 to 4000, height 1 to 1000). Or apply one of the eight presets (Gentle, Spiky, Mountain, Straight, Ocean, Ripple, Dramatic, Flat).
  2. Adjust points (2 to 12), amplitude (10 to 150) and curve bend (0 to 1), and pick whether the wave sits on the Top or Bottom edge.
  3. Enter the color as #rrggbb or #rgb. Press Randomize for the next seed or type a seed, then use Copy SVG, Download (wave.svg) or Download PNG (wave.png at the viewport size, 1440 × 320 pixels for Hero).

Frequently asked questions

How do I put an SVG wave divider at the bottom of a section?
Paste the copied SVG at the bottom edge of the section (for example with position: absolute; bottom: 0) and give it a width of 100% and a height in CSS. The markup has a viewBox and preserveAspectRatio="none", which stretches the wave to fill whatever box it gets, so a taller box makes a taller wave. Give the wave the color of the next section so the two blend.
How do I get the same wave again?
Keep the seed. The same size, settings and seed always give the same path. The seed is a field you can type a whole number into (0 to 4294967295) and copy with the Copy seed button, Randomize adds 1 to it, and each preset sets its own seed from 1 to 8.
What do points, amplitude and curve bend change?
Points (2 to 12) is how many curved segments run across the width. Amplitude (10 to 150) sets how high the wave rises: at 50 it starts 50 units above the bottom edge at Hero and Tall sizes, 20.6 at Card and 13.8 at Mobile, because it is scaled to the viewport height. Curve bend (0 to 1) shifts each curve’s control point by a random amount away from the middle of its chord: 0 draws straight segments between the random heights (a zigzag), and higher values bend them more and less evenly, up to 1.
Why are Copy SVG and Download disabled?
The wave color, and the back layer color when there is more than one layer, accept only #rrggbb or #rgb. Anything else draws no wave, the preview says “Enter each color as #rrggbb or #rgb to draw the wave.” and the buttons stay off until the value is a valid hex color.
How do I make layered SVG waves?
Set Layers to 2 to 5. Layer 1 stays in front with the color and seed above; each layer behind it has its own seed field, and the colors blend evenly from the Back color to the front color. With 3 layers, a back color of #9bc9ff and a front color of #007bff, the middle layer is #4ea2ff. Layer opacity, 30 to 100%, is applied to every path, so the back waves show through the front one. Randomize moves every layer to its next seed.
Are the waves quadratic or cubic Bézier curves?
Quadratic. Each segment is one Q command, which takes a single control point, where a cubic C command takes two. One control point per segment keeps the code short: 12 points at Hero size is 469 characters.

Related Tools

View all tools