Faruk ToolsVisit Portfolio

Cubic Bezier & Easing Editor

Drag control points to design a cubic-bezier() curve, or build a multi-point linear() easing function for bounces and springs that cubic-bezier can't express — with a live animated preview and a synced CSS value box.

Nothing leaves the browser. The curve, the preview animation, and every calculation run entirely on this device — there is no network request, no logging, and nothing is saved.

Preview

Drag the control points to shape a CSS cubic-bezier() curve, or switch to linear() for a piecewise-linear easing function with as many points as you want — the kind of bounce, spring, or multi-step motion a two-control-point cubic-bezier simply can't express. cubic-bezier.com, the classic tool for this, only covers the first case; linear() is a newer CSS Easing Level 2 addition it doesn't support at all.

Both editors update a live preview as you drag, using the exact CSS value you're building — not an approximation — so what you see is what ships. The CSS value box stays in sync in both directions: paste an existing cubic-bezier() or linear() value in and the curve redraws to match it.

The math behind both curves — solving where a cubic Bezier curve crosses a given point in time, and interpolating between linear() stops — was cross-checked against real values sampled from the actual Web Animations API in a browser, not just re-derived from the same formulas twice.

How to use this editor

  1. 1Pick cubic-bezier() for a classic two-point ease, or linear() for a curve with as many points as you need.
  2. 2Drag the points on the graph, or type exact numbers into the fields / the CSS value box directly.
  3. 3Watch the preview ball — click ▶ Replay any time, or just keep dragging; it auto-replays a moment after you stop.
  4. 4In linear() mode, use + Add point to insert a new point at the widest gap, and Remove to delete any point except the first and last (which stay pinned at 0% and 100%).
  5. 5Copy the CSS value and drop it straight into transition-timing-function, animation-timing-function, or the Web Animations API's easing option.

cubic-bezier() vs. linear()

cubic-bezier(x1, y1, x2, y2)linear(...)
Control pointsExactly 2As many as you want
Can represent a bounce or springOnly an approximationYes, exactly
Browser supportUniversal, for over a decadeModern browsers (2023+)
x-axis (time) constraintx1, x2 must be between 0 and 1Positions must be non-decreasing
y-axis (value) constraintNone — can overshoot past 0 or 1None — can overshoot past 0 or 1

Frequently asked questions

What's the difference between the linear keyword and the linear() function?+

They look almost identical but do opposite jobs. The bare linear keyword means "no easing at all" — constant speed, equivalent to cubic-bezier(0, 0, 1, 1). The linear() function (with parentheses and at least one stop) is the newer CSS Easing Level 2 feature this tool's second tab builds — a fully custom piecewise curve that can bounce, spring, or step, named linear only because each segment between its points is a straight line, not because the overall motion is constant speed.

Why does cubic-bezier.com only show two draggable points?+

Because a CSS cubic-bezier() timing function is mathematically defined by exactly two control points (plus the fixed start and end at (0,0) and (1,1)) — that's the whole feature, not a limitation of that particular tool. To get a curve with more shape than two points allow — a bounce, an overshoot-then-settle, multiple humps — you need linear() instead, which is what this tool's second tab is for.

Can x1 or x2 be negative or greater than 1?+

No — the CSS spec requires both to be between 0 and 1, since they represent a point in time and time can't run backwards or loop within a single easing curve. y1 and y2 have no such limit, which is exactly what lets a cubic-bezier curve overshoot past its endpoints for a bounce-like effect.

Why does my linear() curve look jagged instead of smooth?+

linear() is piecewise-linear by definition — straight segments between points, not smoothed curves. That's intentional and is what makes it capable of exact bounces and springs (which are naturally made of many nearly-straight segments) rather than the smooth S-curves cubic-bezier() produces. Add more points and space them closer together where you want the motion to feel smoother.

Do transition-timing-function and animation-timing-function accept the same values?+

Yes — both accept any easing value covered here: the named keywords (ease, linear, ease-in-out, etc.), cubic-bezier(...), linear(...), and step functions. The Web Animations API's easing option (used with element.animate()) accepts the same syntax as a string too.