CSS Waves Generator

Free CSS Shape Tool

CSS Waves Generator

Create custom CSS wave shapes visually. Adjust amplitude, wavelength, phase, position, direction and color, preview the result and copy clean CSS or export the wave as SVG.

Higher values create taller waves.
Controls the number of cycles across the width.
Higher values create a smoother curve.
Preview
The generated CSS uses clip-path: polygon() with percentage coordinates so the wave scales with its container.

Generated CSS Code

How to Use the CSS Waves Generator

  1. Adjust amplitude to make the wave taller or flatter.
  2. Change wavelength to control how many wave cycles appear across the element.
  3. Increase the number of points to create a smoother curve.
  4. Use phase to shift the wave horizontally.
  5. Adjust vertical offset to move the wave higher or lower.
  6. Choose whether the wave appears at the top or bottom of the element.
  7. Invert the wave if you want to flip its shape.
  8. Select a fill color for the preview.
  9. Enable animation and adjust the speed if you want a moving wave.
  10. Copy the CSS code or export the shape as SVG.

What Is This CSS Waves Generator?

This CSS Waves Generator is a free visual tool for creating curved section dividers, decorative backgrounds and wave-shaped UI elements. It generates percentage-based clip-path: polygon() coordinates that can be applied to normal HTML elements.

You can control amplitude, wavelength, smoothness, phase, vertical position, direction, inversion and color. The tool also supports animated previews and SVG export for projects where a vector wave is more appropriate than a CSS polygon.

CSS Wave Examples

Hero Section Bottom Wave

A wide wave at the bottom of a hero section creates a smooth visual transition into the next part of the page.

Top Wave Section Divider

A wave placed at the top of a section can separate contrasting background colors without using a straight horizontal edge.

Layered Ocean Waves

Several overlapping wave elements with different colors and offsets can simulate ocean water or fluid decorative backgrounds.

Animated Wave Background

Moving the phase or background position creates a subtle animated wave for loading screens, landing pages and interactive banners.

Footer Wave Divider

A wave above the footer creates a softer transition between page content and the closing navigation area.

CSS Waves Guide

How CSS Wave Shapes Work

A wave can be represented as a series of coordinate points. The generator converts the curve into percentage-based polygon points and applies them through the CSS clip-path property.

.wave {


width: 100%;
height: 200px;
background: #fdca40;
clip-path: polygon(
0% 70%,
10% 60%,
20% 55%,
30% 60%,
40% 70%,
50% 80%,
60% 85%,
70% 80%,
80% 70%,
90% 60%,
100% 55%,
100% 100%,
0% 100%
);
}

Wave Amplitude

Amplitude controls the vertical height of the wave. A low amplitude creates a gentle curve, while a high amplitude creates deeper peaks and valleys.

Wave Wavelength

Wavelength controls how many wave cycles appear across the width. Fewer cycles create long, smooth curves. More cycles create a tighter wave pattern.

Wave Phase

Phase shifts the wave horizontally. Changing the phase does not change the height or number of cycles, but it changes where peaks and valleys appear.

Number of Points

Since clip-path: polygon() uses straight segments between points, adding more points makes the final curve appear smoother. More points also produce a longer CSS value.

Top and Bottom Waves

Bottom waves are commonly used below hero sections. Top waves work well for sections that need a curved entrance from the content above.

.section-wave {


position: absolute;
left: 0;
width: 100%;
height: 160px;
}

.section-wave.bottom {
bottom: 0;
}

.section-wave.top {
top: 0;
}

Using a Wave as a Section Divider

A wave divider can be positioned absolutely inside a section. The parent section should use position: relative and enough padding to prevent content from overlapping the wave.

.hero {


position: relative;
min-height: 600px;
padding: 6rem 2rem 12rem;
overflow: hidden;
background: #2563eb;
}

.hero-wave {
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 180px;
background: #ffffff;
}

Layered Waves

Multiple wave elements can be stacked with slightly different positions, amplitudes and opacity values to create depth.

.wave-back {


background: rgba(96, 165, 250, .45);
transform: translateY(20px);
}

.wave-front {
background: #2563eb;
}

Animating CSS Waves

Complex polygon coordinates are not always ideal for continuous animation. A practical technique is to place a wide repeating wave inside an overflow-hidden wrapper and animate its horizontal position.

.wave-track {


width: 200%;
animation: move-wave 8s linear infinite;
}

@keyframes move-wave {
from {
transform: translateX(0);
}

to {
transform: translateX(-50%);
}
}

CSS Wave vs SVG Wave

CSS polygon waves are convenient for simple scalable section dividers. SVG is often better for highly precise curves, complex animation, gradients, masks or reusable vector assets.

Responsive Wave Shapes

Percentage coordinates allow the wave to scale with the width and height of its element. However, very narrow or very tall containers may change the apparent shape, so test the result across multiple screen sizes.

Accessibility Considerations

Decorative waves should not contain essential information. If an SVG wave is purely decorative, hide it from assistive technology with aria-hidden="true".

Performance Considerations

Static clip paths are generally suitable for decorative sections. Avoid animating very large elements with extremely complex polygons on every frame. For continuous motion, transform-based animation is usually a better choice.

Best Practices

  • Use percentage coordinates for responsive wave shapes.
  • Use enough polygon points to create a smooth curve.
  • Avoid extremely complex polygons when a simple wave is sufficient.
  • Use absolute positioning for section dividers.
  • Add enough section padding to prevent content overlap.
  • Use layered waves sparingly to avoid visual clutter.
  • Prefer SVG for precise or complex animated waves.
  • Respect reduced-motion preferences when using animation.

CSS Waves Generator FAQ

How do I create a wave shape in CSS?

You can create a wave-like shape with clip-path: polygon() by defining a sequence of coordinate points that approximate a curved line.

What does wave amplitude control?

Amplitude controls the vertical distance between the wave peaks and valleys. Higher amplitude values create taller waves.

What does wavelength control?

Wavelength controls how many wave cycles appear across the width of the element.

Why does the generator use many polygon points?

Polygon edges are straight, so more points make the final shape appear smoother and closer to a natural curve.

Can I put the wave at the top of a section?

Yes. The wave can be generated for the top or bottom edge and positioned accordingly inside the section.

Can CSS waves be animated?

Yes. Wave movement can be simulated with phase changes, transform animation or a horizontally moving wave track.

Should I use CSS or SVG for wave dividers?

CSS is convenient for simple responsive shapes. SVG is usually better for precise curves, complex gradients and advanced animation.

Do CSS clip-path waves work responsively?

Yes. Percentage-based polygon coordinates scale with the element, although the final appearance should still be tested at different aspect ratios.

Last update: 11. 07. 2026.