CSS Easing Bezier Generator: Practical Tips and Common Mistakes
Reviewed by the OnlineFree.app team · Updated
Key points
- A cubic-bezier() value is four numbers defining two draggable control points on a curve where x is time and y is progress.
- Only y may leave the 0–1 range; any x outside 0–1 makes the timing function invalid and browsers ignore it.
- Spring mode cannot export as an exact cubic-bezier, so sampled linear() output or the Framer Motion spring object is more faithful.
- Set duration before shaping the curve, because a curve tuned at 200 ms misbehaves at 900 ms.
- Copy the generated numbers instead of retyping them; a swapped control point is invisible in review but changes the feel.
What does cubic-bezier() actually do in CSS?
A cubic-bezier() value is a CSS easing function written as four numbers — x1, y1, x2, y2 — that place two control handles on a curve where the horizontal axis is time and the vertical axis is progress. A cubic Bézier curve technically needs four points, but CSS pins the first at (0,0) and the last at (1,1), so only the two middle handles are yours to move.
That is exactly what the CSS Easing Bezier Generator exposes: an SVG graph with draggable P1 and P2 points. The x coordinate of each handle is locked to 0–1 because time cannot run backwards, while y is allowed to range from -0.5 to 1.5 so you can build overshoot and anticipation without hand-editing numbers in a text editor.
The named keywords you already use are just fixed curves: ease is cubic-bezier(0.25, 0.1, 0.25, 1), ease-in is cubic-bezier(0.42, 0, 1, 1), and ease-out is cubic-bezier(0, 0, 0.58, 1). The formal definition of how those four numbers map to a timing function lives in the W3C CSS Easing Functions specification, which is worth skimming once — it explains why y values outside 0–1 are legal but x values are not.
Why is my curve rejected as invalid CSS?
Almost every invalid cubic-bezier() error comes from the same cause: an x value outside the 0–1 range. Browsers follow the spec and discard a timing function where x1 or x2 falls below 0 or above 1, because that would mean the animation travels backwards in time. If a value silently does nothing, check the first and third numbers first.
The y numbers are a different story. A y below 0 makes the element start by moving away from its target (anticipation); a y above 1 makes it overshoot and settle back. Both are valid and both are easy to overdo — a y2 of 1.5 turns a 600 ms slide into a rubber band that reads as a bug rather than a flourish.
The generator's y clamp of -0.5 to 1.5 is a deliberate guardrail, not a limit of the CSS spec. Dragging past the top of the graph and seeing nothing happen is the tool telling you the curve has stopped being useful for UI motion, not that the browser refuses it. MDN's cubic-bezier() reference documents the same range behaviour if you want a second opinion.
Tune the easing on the property you will animate
Distance changes how a curve feels. The same cubic-bezier(0.34, 1.56, 0.64, 1) that feels snappy on a 40 px translate can look sluggish on a full-screen clip-path reveal, because the eye judges speed relative to how far the element travels. The CSS Easing Bezier Generator therefore has a preview property selector — transform: translateX, transform: scale, opacity, and clip-path — and you should switch it to whatever you will actually ship before you start dragging.
Duration matters just as much. The slider runs from 50 to 3000 ms and starts at 600 ms, which is a reasonable default for a panel slide but too slow for a button press and too fast for a modal backdrop. Set the duration first, then shape the curve, because a curve tuned at 200 ms will feel wrong when you drop it into a 900 ms transition.
One workflow habit we recommend: the loop toggle is off by default so each replay is deliberate. Watch the animation once, decide what is wrong — too abrupt at the start, too floaty at the end — adjust exactly one handle, and replay. Dragging both handles while the animation loops usually produces a curve that is pleasant in isolation and wrong in context.
Spring presets do not export as clean cubic-bezier
Switching the curve type to spring replaces the graph with two sliders: stiffness from 40 to 400 and damping from 5 to 40. Springs are not Bézier curves, so there is no exact four-number equivalent. The generator resolves this by sampling the spring into stops for CSS linear() or producing the closest cubic-bezier approximation, and the two are not identical at the tail end.
The practical consequence is that a spring tuned at stiffness 220 and damping 18 may overshoot slightly differently in the browser than in the preview. Treat the sampled output as a close match and verify on a real device, especially for anything with a bounce that lands near a layout edge where a few extra pixels are visible.
If you are shipping Framer Motion, use the spring tab properly: the export gives you { type: 'spring', stiffness, damping } directly rather than a sampled curve, which is the more faithful option. Use the CSS linear() output only when you are constrained to plain CSS and cannot ship a motion library.
Copy the right tab for CSS, Tailwind and Framer Motion
The generated code appears in three tabs, and the most common mistake is pasting from the wrong one. The CSS tab emits transition-timing-function: cubic-bezier(...), or animation-timing-function: linear(...) with sampled stops when you used the spring mode. That is the version to use in plain stylesheets and CSS modules.
The Tailwind tab gives you either a theme.extend.transitionTiming entry for your config or an arbitrary value like ease-[cubic-bezier(0.34,1.56,0.64,1)]. The arbitrary form works anywhere and is the safer choice if you are on a newer Tailwind version where configuration is CSS-first; the config form needs to be registered before the class name exists. The Framer Motion tab emits transition: { duration, ease: [...] } where the ease array is the same four numbers, or a spring object.
Always paste the numbers rather than retyping them — a swapped 0.34 and 0.64 is invisible in code review but changes the entire feel of the animation. If you need other quick utilities while wiring up a UI, the rest of the free online tools on OnlineFree.app run the same way: open the page, get the output, nothing to install.
A short pre-ship checklist for easing curves
Before you commit a curve, run through four checks. First, confirm the exported timing function is attached to the right CSS property and selector. Second, verify the duration in the generated snippet matches the slider value you tuned — a copied snippet with the old 600 ms next to a curve tuned at 300 ms is the single most common copy-paste error we see.
Third, test with reduced motion in mind: an overshooting curve can be uncomfortable, so pair it with a prefers-reduced-motion fallback that swaps to a plain 0.01 ms or a simple opacity fade. Fourth, check the curve on a slower device or with the CPU throttled, because a heavy animation can drop frames and turn a smooth ease into a stutter that no timing function can fix.
If you want to iterate quickly, keep the CSS Easing Bezier Generator open in a tab while you work — it runs entirely in your browser, so there is no account, no build step, and no dependency to add to your project. Re-drag the handles, copy the new code, and confirm the numbers you shipped match the numbers you tuned.
Frequently asked questions
Is the CSS Easing Bezier Generator free, and does it send my code anywhere?
Yes, it is free and requires no sign-up. The curve maths, preview and code generation all run in your browser, so the values you drag stay on your machine rather than being posted to a server. That also means it works offline once the page has loaded, and you can close the tab without losing anything except the curve you did not copy.
Can I use a spring easing in plain CSS without a library?
Not natively — CSS has no spring timing function. The CSS Easing Bezier Generator handles this by sampling the spring into multi-stop linear() output or the closest cubic-bezier approximation. The linear() version tracks the spring more faithfully but produces a long value, while the four-number approximation is compact and slightly less accurate at the settle point.
What do y values above 1 in cubic-bezier mean?
A y value above 1 means the animated property passes its target and comes back, which is how you get an overshoot bounce. A y below 0 makes it move the wrong way first, producing anticipation. Both are valid CSS and both are easy to overdo: a modest 1.2 to 1.4 reads as polish, while 1.5 usually reads as a glitch, especially at short durations.
How many numbers does Framer Motion's ease array take?
Four. Framer Motion accepts ease: [x1, y1, x2, y2] using exactly the same four control-point numbers as CSS cubic-bezier(), plus named strings like 'easeOut'. If you want a real spring instead, drop the array and pass { type: 'spring', stiffness, damping } — the CSS Easing Bezier Generator's Framer Motion tab emits both forms depending on which curve type you selected.
Why does my animation look different after copying the code?
The three usual causes are a duration mismatch, a different animated property, and a different travel distance. Copy the duration from the generator rather than leaving an older value in your stylesheet, and remember the preview property selector only matches reality if you picked the property you actually animate. Overshoot also becomes far more visible on small elements than on large ones.