Cubic-Bezier Editor
Design CSS easing curves with a draggable cubic-bezier editor, compare them with linear in a live animation, and copy cubic-bezier() or a linear() version.
Drag the two handles (P1 and P2). Time runs left to right, progress bottom to top; handles may go above 1 or below 0 for a bounce. With a handle focused, use the arrow keys (Shift for 0.1).
Animation preview
The animation is paused because your system asks for reduced motion. Press Play to run it anyway.
The same curve sampled as a CSS linear() easing (Chrome 113+, Firefox 112+, Safari 17.2+). More points follow the curve more closely.
How to use the cubic-bezier editor
- Drag the two handles on the graph. P1 (the first control point) shapes the start of the motion, P2 the end. Time runs from left to right and progress from bottom to top.
- Or type a value in cubic-bezier() value: a full
cubic-bezier(0.4, 0, 0.2, 1), four numbers, or a keyword such asease-in-out. The fields x1, y1, x2 and y2 edit one coordinate at a time. - Start from the Presets menu (CSS keywords, the sine to back families, and Material Design curves) or the keyword buttons. When your curve matches a preset, its name is shown next to the buttons.
- Watch the Animation preview: the dot on Your curve and the dot on linear travel the same distance in the same Duration. Use Pause/Play and Restart to compare them.
- Copy the result from CSS timing function, or copy the linear() approximation and choose its number of Segments.
Keyboard: focus a handle and use the arrow keys to move it by 0.01, or 0.1 with Shift.
If your system is set to reduce motion, the animation starts paused. Press Play if you want to run it anyway.
What cubic-bezier() means
A CSS easing function maps the elapsed time of a transition (0 to 1) to its progress (0 to 1). cubic-bezier(x1, y1, x2, y2) describes this mapping with a cubic Bézier curve that starts at (0, 0), ends at (1, 1) and is pulled by two control points, P1 = (x1, y1) and P2 = (x2, y2).
- x values are times and must stay between 0 and 1, otherwise the function would not be a valid timing curve. The editor keeps them in range.
- y values are progress and may go below 0 or above 1. A y above 1 makes the animation overshoot its target and come back, like the Back curves; below 0 it first moves backwards.
- A steep slope means fast movement, a flat slope slow movement.
ease-outstarts fast and ends slow, which feels natural for elements entering the screen.ease-indoes the opposite and suits elements leaving.
The CSS keywords are shortcuts: ease = cubic-bezier(0.25, 0.1, 0.25, 1), ease-in = (0.42, 0, 1, 1), ease-out = (0, 0, 0.58, 1), ease-in-out = (0.42, 0, 0.58, 1) and linear = (0, 0, 1, 1).
The linear() approximation
The newer linear() function lists progress values at evenly spaced times, for example linear(0, 0.25, 0.5, 0.75, 1), and joins them with straight lines. The tool samples your curve (it solves the Bézier for each time step) and writes those values with three decimals. With 20 to 40 segments the result is visually identical to the curve. The real benefit of linear() is for curves a Bézier cannot draw, like bounces and springs, but it also lets you share one syntax. It works in Chrome and Edge 113+, Firefox 112+ and Safari 17.2+, so keep the cubic-bezier() value as a fallback.
Frequently asked questions
Where do I use the value?
In transition-timing-function, animation-timing-function, or the shorthand: transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);. The Web Animations API accepts it as easing.
What are good durations?
Small UI changes usually last 150 to 300 ms; large movements across the screen 300 to 500 ms. Longer animations quickly feel slow.
Why can't I drag a handle beyond the left or right edge?
Because x is time, and time cannot go backwards: CSS rejects x values outside 0–1.
Which curves does Material Design use?
The classic standard curve is cubic-bezier(0.4, 0, 0.2, 1), with decelerate, accelerate and sharp variants. Material 3 adds the emphasized curves; all are in the Presets menu.
How should I handle reduced motion?
Respect @media (prefers-reduced-motion: reduce) in your CSS: shorten or remove large movements and keep simple fades.
Related tools
- Box Shadow Generator Design layered CSS box shadows with a live preview. Set offset, blur, spread, color, opacity and inset, try neumorphism presets and copy the code.
- Flexbox and Grid Playground Build flexbox and CSS grid layouts visually. Set container and item properties, name grid areas, see the result live and copy clean CSS and HTML.
- CSS Gradient Generator Create linear, radial and conic CSS gradients with a live preview. Add and drag color stops, set the angle and copy clean CSS code in one click.