SVG Wave Section Dividers: How to Add Smooth Waves Between Website Sections
A straight horizontal line between sections is the default on almost every website. A gentle wave instead adds movement and softness, and it has become a common pattern on landing pages, SaaS sites and portfolios. The good news: a wave divider is just a small SVG with a few curves, and it can be added without images, libraries or JavaScript.
Anatomy of a wave divider
A wave divider is an SVG shape whose top edge is a smooth curve and whose bottom is a straight line across the full width. It’s placed at the edge of a section, filled with the color of the neighbouring section, so it looks like one section flows into the next.
A typical wave SVG:
<svg viewBox="0 0 1440 320" preserveAspectRatio="none">
<path d="M0,192 C240,128 480,256 720,224 C960,192 1200,96 1440,160 L1440,320 L0,320 Z" fill="#141414"/>
</svg>viewBox="0 0 1440 320"sets up a coordinate system 1440 units wide and 320 tall.- The path starts on the left edge, curves across with cubic Bézier commands (
C), then drops to the bottom-right (L1440,320), goes back to the bottom-left and closes. preserveAspectRatio="none"lets the shape stretch to any width without keeping proportions, so the wave always spans the full section.
The SVG wave generator above generates these paths with controls for number of waves, height and layers.
How waves are generated
A wave generator places a series of points evenly across the width, varies their height randomly within a range, and connects them with smooth curves (often a spline converted to Bézier curves). More points create more, shorter waves; a larger height range creates taller waves.
| Setting | Effect |
|---|---|
| 2–4 waves | Calm, gentle |
| 5–8 waves | Lively |
| 10+ waves | Busy, choppy |
| Low height | Subtle edge |
| High height | Dramatic, takes up vertical space |
Placing waves at the top or bottom
There are two common placements:
- At the bottom of a section, filled with the color of the next section, so the next section appears to rise into the current one as a wave.
- At the top of a section, filled with the color of the previous section and flipped vertically, so the previous section hangs down into this one.
Flipping can be done in the path itself or with transform: scaleY(-1) on the SVG.
Place the SVG as a block element with no gap:
.wave { display: block; width: 100%; height: 120px; }display: block removes the small gap below inline SVGs caused by text baseline alignment, one of the most common reasons a thin line appears between the wave and the section.
Layered waves
Stacking two to four waves in the same color with different opacities creates depth, like overlapping hills or ocean swells. The back layers are more transparent and slightly taller; the front layer is solid. It adds richness without introducing new colors.
Responsive behaviour
Because the SVG stretches horizontally, waves look gentler on wide desktop screens and steeper on narrow phones. To keep proportions reasonable:
- Set a fixed or clamped height:
height: clamp(60px, 10vw, 160px). - Use fewer waves for mobile-first designs; many waves compressed into a 390px width look jagged.
- Test at 320px, 768px and 1440px+.
Waves versus other dividers
| Divider | Look | Technique |
|---|---|---|
| Straight line | Clean, neutral | Nothing needed |
| Angled / slanted edge | Dynamic, geometric | clip-path: polygon(...) or a skewed pseudo-element |
| Wave | Soft, organic | SVG path |
| Curve (single arc) | Gentle, elegant | SVG or border-radius on a wide pseudo-element |
| Zigzag / torn edge | Playful, crafted | SVG or CSS gradients |
For angled edges, see our clip-path guide.
CSS-only alternatives
The CSS mask-image property can apply a wave-shaped mask to the bottom of a section, using an SVG as the mask image. This lets a section with a photo or gradient background have a wavy edge, which a solid-color SVG divider can’t do. It needs -webkit-mask-image for some browsers, and a bit more setup, but it’s the right tool when the section background isn’t a flat color.
Accessibility and semantics
Wave dividers are decoration. Add aria-hidden="true" and focusable="false" to inline SVGs so assistive technology ignores them. Don’t put meaningful content inside the wave area, and make sure the color change between sections still gives enough contrast for any text near the edge.
How small a wave SVG is
An inline wave SVG is typically 200–600 bytes, far lighter than an image. If you use the same wave on many pages, putting it in an external SVG file or a CSS background lets the browser cache it.
Waves that don’t look like a template
- Match the wave fill exactly to the adjacent section’s background color; even a tiny mismatch shows as a seam.
- Use one wave style consistently across the site rather than different waves for every section.
- Combine waves with generous padding so content doesn’t sit right on the curve.
- Pair with organic blob shapes sparingly; both together can feel overly bubbly.