Free · Live · Nothing uploaded

CSS easing & cubic-bezier generator

Drag the curve, watch the motion live, and copy a ready-to-use cubic-bezier() timing function.

overshoot 1 0 0 time 1

Drag either point · Shift for bigger steps · Alt for fine · arrow keys when focused

Your easing
Linear
1.0s

How to design a custom CSS easing curve

Drag the two handles to shape the curve, or start from a named preset and fine-tune it.

🎯

1. Pick a preset

Start from ease-in-out, back, or another familiar curve.

🖐️

2. Drag the handles

Shape the curve — the ball preview updates live.

📋

3. Copy the CSS

Drop the cubic-bezier() value into any transition or animation.

A CSS easing curve is a cubic bezier running from (0,0) to (1,1); the two control points bend how quickly the animated value changes over time. The x values of both control points must stay between 0 and 1, but the y values can go outside that range — that's what produces a slight overshoot ("back") or anticipation effect. The same cubic-bezier() value works for both transition-timing-function and animation-timing-function. For the shapes those transitions might animate, try the CSS Shadow Generator or Flexbox & Grid Generator.

Why easing matters more than duration

Nothing in the physical world starts or stops instantly, so linear motion reads as mechanical and cheap. Easing describes how an animation's rate changes over its duration, and it is what makes motion feel deliberate rather than computed.

The three basic shapes each carry meaning. ease-out starts fast and decelerates, which suits anything entering the screen — the element arrives with momentum and settles. ease-in starts slow and accelerates, which suits exits, since the element gathers speed as it leaves. ease-in-out does both and suits movement between two on-screen positions.

The most common mistake is using ease-in for entrances. An element that starts slowly and speeds up as it arrives feels sluggish at exactly the moment the user is waiting for it. For anything responding to interaction, ease-out is almost always the right default because the response begins immediately.

Bézier curves and springs

cubic-bezier() takes four numbers defining two control points, with the curve running from (0,0) to (1,1). The x axis is time and the y axis is progress. Values outside 0 to 1 on the y axis are permitted and produce overshoot — progress passing 1 and coming back — which is how bounce and anticipation effects are made. Values outside 0 to 1 on the x axis are invalid, since time cannot run backwards.

The named keywords are all cubic-beziers underneath: 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). Custom curves generally beat the defaults — the built-in ease in particular is a fairly weak curve, and something like (0.16, 1, 0.3, 1) produces a much more decisive deceleration.

Bézier curves are fixed-duration, which is their limitation. Spring physics instead derives motion from stiffness, damping and mass, so an interrupted animation continues naturally from its current velocity rather than jumping. That makes springs better for interactive, interruptible motion — dragging, dismissing, gestures — while curves remain fine for one-shot transitions. CSS has a linear() function that can approximate a spring by listing many sampled points.

Duration, properties and restraint

Duration should scale with distance and size. Small elements moving short distances want 150 to 200 milliseconds; larger movements 250 to 400. Beyond about 500 milliseconds, motion starts to feel slow, and interface animation over a second reads as an obstacle. Hover feedback should be very fast, around 100 milliseconds, because it responds to a deliberate action.

Animate only transform and opacity where you can. Both are handled by the compositor without triggering layout or paint, so they run smoothly even under load. Animating width, height, top, left or margin forces layout recalculation every frame and is the usual cause of janky animation — use a transform instead.

Always honour prefers-reduced-motion. For people with vestibular disorders, large or spinning motion can cause genuine nausea, and the media query lets you replace movement with a simple opacity change while keeping the interface comprehensible. Reduced motion means less motion, not no feedback.

Easing generator FAQ

How do I edit the curve precisely?

Press anywhere on the plot and the nearer of the two control points comes to your pointer — you don't have to hit the dot itself, which matters most on a phone where a finger covers the target. Hold Alt while dragging for fine control (movement is scaled down around where the point already is), or focus a point and use the arrow keys: Shift for 0.1 steps, plain for 0.02, Alt for 0.005. You can also type exact values into the x1/y1/x2/y2 fields when a curve arrives in a spec rather than by feel.

Why can the curve go above 1 or below 0?

Because useful easings do. A curve that rises above 1 overshoots its target and settles back — that's the bounce in easings like easeOutBack — and one that dips below 0 pulls back before moving forward. The shaded bands above and below the plot are that overshoot range, and the control points can be dragged into them. The limits are −0.35 to 1.35, which covers every standard named easing with room to spare.

What is a cubic-bezier timing function?

A curve from (0,0) to (1,1) defined by two control points, cubic-bezier(x1, y1, x2, y2). X values stay within 0–1; y values can exceed that range for overshoot effects.

Can I use this for both transitions and animations?

Yes — the same value works as transition-timing-function or animation-timing-function.

Is anything uploaded?

No — this is a static CSS generator that runs entirely in your browser.

Which easing should I use by default?

ease-out for anything entering or responding to interaction — it starts immediately and settles. ease-in for exits. Using ease-in on an entrance feels sluggish because it starts slowly.

Why is my animation janky?

Probably animating a property that triggers layout — width, height, top, left or margin. Animate transform and opacity instead; the compositor handles both without recalculating layout each frame.