← Cubic Bezier Playground

Cubic Bezier Playground: How It Compares for CSS Easing

Reviewed by the OnlineFree.app team · Updated

Key points

  • Cubic Bezier Playground turns four numbers into a draggable curve and a paste-ready CSS snippet with no sign-up.
  • The x control values are clamped to 0–1 by the CSS spec, while y values may overshoot for bounce and anticipation.
  • Preview transform and opacity for smooth compositor animation; preview width when your real element animates layout.
  • Overshoot above roughly 10% can clip against overflow or collide with neighbouring elements near viewport edges.
  • transition-timing-function does nothing on its own; it needs a property and a duration to have any effect.

How does it compare to other easing workflows?

Cubic Bezier Playground is a single browser page that lets you drag two control points on a curve, watch a real DOM element animate, and copy a ready-to-paste cubic-bezier() snippet — no account, no build step, no numbers typed from memory. That places it between the two usual options: settling for keyword easings, and shaping a curve inside a full design or motion tool.

Keyword values are the cheapest option and often the right one. The catch is that ease-in-out is one fixed curve; the moment you want the deceleration to land earlier, or a short punchy move instead of a floaty one, you need coordinates. A playground is faster than hand-editing four decimals in a stylesheet and reloading.

Compared with browser DevTools, the Cubic Bezier Playground works before any CSS exists — you can design the curve first and paste it into a component you have not written yet. Compared with design or motion libraries, it is narrower on purpose: one curve, one snippet, no runtime dependency shipped to your users.

What the four numbers in cubic-bezier() actually mean

The function takes four values: cubic-bezier(x1, y1, x2, y2). They are the coordinates of two control points inside a 1×1 box. The curve always starts at (0,0) and ends at (1,1); the control points only bend the path between them. Horizontal position is time progress, vertical position is output progress.

CSS clamps x1 and x2 to the 0–1 range because time must never run backwards, and the tool enforces the same limit when you drag. The y values are unbounded, which is what makes overshoot possible: y = 1.56 sends the element roughly 56% past its end value before it settles back, and a negative y creates anticipation in the opposite direction first.

If you would rather start from a known curve, the presets snap the handles into place: ease becomes (0.25, 0.1, 0.25, 1), ease-in-out becomes (0.42, 0, 0.58, 1), and the snappy preset is (0.4, 0, 0.2, 1). Dragging any handle afterwards flips the selector back to custom, so the generated code always matches what you see.

Preview the property you are actually animating

The preview selector matters more than most people expect. Transform and opacity animate on the compositor and stay smooth at 400 ms; width triggers layout on every frame, so a perfectly shaped curve can still stutter on a mid-range phone. If your real element animates width or height, preview width so you judge the honest version.

Perceived speed also depends on distance and size. A 400 ms translate of 8 pixels reads as nearly instant, while a 400 ms fade of a full-screen overlay reads as slow. The duration field runs from 50 ms to 5000 ms in 10 ms steps with a 400 ms default — useful for checking the same curve at 150 ms and at 600 ms before you commit.

Be honest about the limit: the preview is one sample box, not your layout. Text size, container size and device frame rate all change how a curve feels, so test the copied code in the real component.

When a preset beats a hand-drawn curve

Most interfaces need two or three curves, not twenty. The snappy preset (0.4, 0, 0.2, 1) is a solid default for elements entering or expanding, because it accelerates briefly and spends most of its time decelerating. A plain ease-out is the safer choice for exits and dismissals.

The playful presets are where hand-tuning pays off — and where it goes wrong. Overshoot (0.34, 1.56, 0.64, 1) travels about 56% past the target, and the soft spring-ish curve (0.22, 1.2, 0.36, 1) about 20%. On a scaled card or a toast near the viewport edge, that extra travel can clip against overflow: hidden or push against a neighbour. Keep text-adjacent elements closer to 5–10% overshoot.

Consistency beats novelty. If every component carries its own curve, the product feels noisy even when each curve is fine in isolation. Pick your set, name the values in a token file, and reuse them.

Copy the snippet without breaking your stylesheet

The generated block is a plain rule you can paste straight in, for example .my-element { transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1); }. Note that the shorthand sets property, duration and timing together, so pasting it over an existing transition replaces the whole declaration rather than adding to it.

Three mistakes show up repeatedly. Forgetting units — 400 means 400 ms only inside the shorthand, while transition-duration needs 400ms. Setting transition-timing-function alone, which does nothing without a property and duration. And expecting the snippet to control a keyframe animation, where timing is set with animation-timing-function or per keyframe inside the @keyframes block.

After pasting, verify in context and on a slow device, and wrap decorative overshoot in a prefers-reduced-motion check so motion-sensitive users get a calm version. The curve maths runs locally in your browser; if you want other no-install utilities, the free online tools on OnlineFree.app cover the same no-signup pattern.

Frequently asked questions

Is Cubic Bezier Playground free, and does it need an account?

Yes, it is free and requires no account. Open the page, drag the two control points, and copy the generated CSS; all curve maths happens in your browser. As of 2026 there is no paid tier or export limit on the tool page. Because it is a public web page, avoid pasting confidential design values into any field.

Why can't I set the x values beyond 0 and 1 in Cubic Bezier Playground?

Because the CSS spec requires it. The x coordinates represent time progress, which must move forward monotonically, so browsers clamp x1 and x2 to the 0–1 range. The y values are not clamped: they can exceed 1 for overshoot or drop below 0 for anticipation, which is why bounce-style curves are still possible.

Can I use the generated cubic-bezier() code in CSS animations, not just transitions?

Yes. The same function works as an animation-timing-function value, either on the animation shorthand or on individual keyframes. Transitions and keyframe animations interpret the curve identically, so a curve you shape in Cubic Bezier Playground for a hover effect can be reused in a @keyframes animation without changing the numbers.

What is cubic-bezier(0.4, 0, 0.2, 1) used for?

It is a fast-out, slow-in curve that the Cubic Bezier Playground ships as the snappy preset. It accelerates briefly, then spends most of its duration settling, which suits elements entering, expanding or sliding into place. It is a reasonable default for interface motion when you want something punchier than ease-out but not playful enough to overshoot.

How accurate is the live preview compared with my real site?

It is indicative, not exact. The preview animates one sample box with the property, duration and curve you choose, so the timing shape is faithful, but distance, element size and device frame rate change how fast a curve feels. Always test the copied code in the real component on a slower device before shipping.

References

Try Cubic Bezier Playground free — no sign-up, works in your browser
Open the tool →

More free tools

Step-by-step guides in our blog & guides.

Free Wifi Qr Code Generator Calcul Mensualité Crédit Immobilier Video Watermark Tool حاسبة علمية أون لاين — Online Scientific Calculator (Arabic / RTL) Calendario Online Editable Gratis Cron Expression Describer + Tester Css Gradient Generator Online T-Shirt Mockup Generator AI Text Humanizer حاسبة نهاية الخدمة للموظفين