An SVG wave generator for section dividers
This SVG wave generator creates the curved dividers often placed between page sections. Each wave is a single filled <path> in a 1440 × 320 viewBox, generated from random points that pass through a seeded random number generator. The same seed and settings always give the same wave, so you can note the seed and come back to it later.
Example output
The default wave (seed 7, 5 points, 50% amplitude, smooth style):
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320" preserveAspectRatio="none"><g>
<path fill="#0f766e" fill-opacity="1" d="M0,81.9C48,83.2 192,64.2 288,89.9C384,115.7 480,219.3 576,236.3C672,253.3 768,204 864,191.8C960,179.7 1056,171.3 1152,163.4C1248,155.6 1392,148 1440,144.9 L1440,320 L0,320 Z"/>
</g></svg>
The curve is built with Catmull-Rom interpolation converted to cubic Bézier segments (C commands), then closed along the bottom edge so the area under the wave is filled.
Options explained
- Seed – the starting value for the random points. Randomize picks a new one.
- Complexity (points) – 2 to 20 segments across the width. More points mean more, narrower waves.
- Amplitude – how far points may move up or down from the baseline.
- Height – where the baseline sits; higher values fill more of the SVG.
- Style – Smooth curves, Peaks (straight lines between points) or Steps (horizontal and vertical lines only).
- Layers – up to three copies of the wave, each shifted 40 units up with lower opacity (1, 0.7, 0.4), for a layered look in one color.
- Flip – rotates the wave 180° so it hangs from the top of a section. Rotation also mirrors it left to right.
- Preview background – only for the preview; it is not written into the SVG.
Using the wave
Place the SVG inline at the bottom of a section and give it display: block; width: 100%; height: 120px;. The preserveAspectRatio="none" attribute lets it stretch to any width and height, and display: block removes the small gap under inline SVGs. Set the section below to the same background color as the wave so they join seamlessly.
The CSS background tab wraps the SVG in a URL-encoded data URI on a .hero class with background-size: cover. That keeps the markup clean, but the color can no longer be changed with CSS. Use background-position: bottom and background-size: 100% 120px if you want the wave only along the bottom edge.
Tips
- Use
fill="currentColor"in the copied SVG to control the color from CSS. - Inspect or tidy the markup in the SVG viewer, or encode it with SVG to Base64.
- For a softer look, combine the wave with a background from the CSS gradient generator.
Privacy
Waves are generated in your browser from the seed; no data is sent to a server.