CSS Generators

Bezier Curve

All tools

Turn four numbers into a cubic-bezier() easing you can drop into any transition or animation.

How it works

Four simple steps

1

Enter x1 and y1

Fill p1 and p2 with the first control point.

2

Enter x2 and y2

Fill p3 and p4 with the second control point.

3

Read both outputs

Get the bare cubic-bezier() value and a full timing declaration.

4

Copy into your CSS

Paste into transition or animation rules, or download bezier.css.

Bezier Curve

About Bezier Curve

A motion spec from the design team lists easing as (0.2, 0, 0, 1) and nothing else. You need it as valid CSS in the transition rule and in the animation shorthand. Enter the four numbers and copy the function.

The tool has four number fields, p1 to p4, which map to x1, y1, x2 and y2 of the curve. They start at 0.25, 0.1, 0.25, 1, which is the same curve as the ease keyword. The output gives the cubic-bezier() value on its own line, followed by a complete transition-timing-function declaration. The first line is the value only, so paste it after a duration in a shorthand rather than as a standalone line.

The x values (p1 and p3) must stay between 0 and 1 or the browser rejects the whole declaration. The y values (p2 and p4) can go outside that range: a y above 1 makes the motion overshoot and settle back, and a negative y makes it pull back before moving. This tool does not draw the curve, so test the result on a real element. A useful starting set: 0.2, 0, 0, 1 for confident UI motion, and 0.34, 1.56, 0.64, 1 for a light bounce. Paste the value into the CSS transition shorthand tool, or try it on a fade or slide with the CSS animation builder.

The output updates as you type in the fields.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Check the first and third numbers. Both are x coordinates of time and must be between 0 and 1. The tool accepts any number, so it will not warn you.

ease is 0.25, 0.1, 0.25, 1. ease-in is 0.42, 0, 1, 1. ease-out is 0, 0, 0.58, 1. ease-in-out is 0.42, 0, 0.58, 1.

Yes. The Web Animations API accepts the same cubic-bezier() string in its easing option, so you can reuse it in element.animate().

View more FAQs

Related tools

View all

Tailwind Class Sorter

Sort Tailwind classes and detect conflicting utilities with a winner explanation.

Open

Design System Diff Lab

Diff design tokens and inspect CSS @layer order and selector specificity locally.

Open

SVG Path Inspector

Parse SVG path commands, preview on canvas, round and minify coordinates.

Open

Flexbox Generator

Build flex layouts visually.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools