FormatterHQ

CSS Cubic Bezier Generator

Drag two control points to shape a cubic-bezier() easing curve, watch it race a standard easing, and copy the timing function for transitions and animations.

Loading tool…
Ready.

How to use the CSS Cubic Bezier Generator

  1. Drag the two handles on the curve graph, type exact x1, y1, x2 and y2 values, or focus a handle and use the arrow keys (Shift for bigger steps).
  2. Or click one of the 26 Presets (CSS keywords plus Sine, Quad, Cubic, Quart, Expo, Circ and Back easings), or paste a value into Paste a timing function and press Load.
  3. Set the Duration, choose a curve under Compare with and press Play to watch both balls move side by side.
  4. Copy the generated transition, animation and custom-property CSS with Copy or Download.

A cubic bezier generator for CSS easing

An easing function decides how an animation's progress is spread over its duration: whether it starts slowly, stops gently or overshoots and settles. In CSS the most flexible easing is cubic-bezier(x1, y1, x2, y2). This cubic bezier generator lets you shape that curve by dragging two control points, then plays your curve next to a reference easing so you can feel the difference before you ship it.

How cubic-bezier() works

The curve always starts at (0, 0) and ends at (1, 1). The horizontal axis is time and the vertical axis is progress. The four numbers you edit are the two control points that bend the curve between those ends:

  • x1 and x2 must stay between 0 and 1, because time cannot run backwards. The editor clamps them for you.
  • y1 and y2 can go outside 0 to 1. Values above 1 make the animation overshoot its end value and come back; values below 0 make it pull back before starting. The graph shows the range from -0.6 to 1.6 so you can drag into both zones, and the status line notes when a curve overshoots.

The five CSS keywords are just named curves:

KeywordEquivalent
ease (default)cubic-bezier(0.25, 0.1, 0.25, 1)
linearcubic-bezier(0, 0, 1, 1)
ease-incubic-bezier(0.42, 0, 1, 1)
ease-outcubic-bezier(0, 0, 0.58, 1)
ease-in-outcubic-bezier(0.42, 0, 0.58, 1)

When your points match one of these, the output uses the keyword instead of the numbers.

Example output

Choosing the easeOutBack preset with a 1-second duration gives:

/* Progress at 50% of the time: 109% */
.element {
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* or for keyframe animations */
.element {
  animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* reuse as a custom property */
:root {
  --ease-custom: cubic-bezier(0.34, 1.56, 0.64, 1);
}

The first comment is calculated from your curve. Here the element is already 9% past its target halfway through, which is the overshoot that makes "back" easings feel springy. For comparison, the default ease reaches 80% at the halfway point.

Options explained

  • Presets include the CSS keywords and the widely used Sine, Quad, Cubic, Quart, Expo, Circ and Back families, each in In, Out and InOut variants.
  • Paste a timing function accepts cubic-bezier(.17,.67,.83,.67), four bare numbers, a CSS keyword or a preset name such as easeInOutQuart.
  • Duration (0.2 to 4s) sets both the preview speed and the value in the generated transition.
  • Compare with picks the curve for the gray reference ball. Comparing against linear shows where your curve is ahead or behind.

Tips for choosing an easing

  • Entering elements (menus, toasts, modals) usually feel right with an ease-out curve: fast start, gentle stop.
  • Leaving elements suit ease-in, so they accelerate away instead of lingering.
  • Elements moving on screen from one place to another usually look natural with ease-in-out.
  • Overshoot needs room. Properties with hard limits cannot show it: opacity is clamped at 1, so a back easing on a fade looks the same as a plain ease-out. Use overshoot on transform.
  • Keep UI motion short. Most interface transitions sit roughly between 150 and 400ms; longer durations make an interface feel slow however good the curve is.
  • Respect reduced motion. Wrap larger movements in a prefers-reduced-motion check.

To use your curve in keyframes, paste it into the custom timing field of the CSS animation generator. For the movement itself, build the values with the CSS transform generator.

Privacy

The curve, preview animation and CSS are all computed in your browser. Nothing is uploaded.

Frequently asked questions

Why can x values not go below 0 or above 1?
The x axis represents time, and the specification requires both x values to be in the 0 to 1 range so the curve never runs backwards in time. Browsers treat a cubic-bezier() with x outside that range as invalid, so the editor clamps them.
Does the timing function apply to the whole animation or each keyframe?
For @keyframes animations, animation-timing-function applies to each segment between two keyframes, not to the whole timeline. A four-step keyframe animation with ease eases in and out between every step.
Can cubic-bezier() make a bounce with several bounces?
No. A cubic Bezier curve can overshoot at most at the start and end, so it produces one anticipation or one overshoot. For multiple bounces, use keyframes, or the newer linear() easing function in browsers that support it.
Can I use the same curve in JavaScript?
Yes. The Web Animations API accepts the same string, for example element.animate(frames, { duration: 600, easing: 'cubic-bezier(0.34, 1.56, 0.64, 1)' }). The Play preview in this tool uses exactly that API.
What is the difference between ease and ease-in-out?
Both start and end slowly, but ease is asymmetric: it accelerates quickly and spends a long time decelerating. ease-in-out is symmetric, with equal acceleration and deceleration.

Last updated September 26, 2026

Related tools

Color Palette Generator Generate colour palettes from a base colour with harmony rules (complementary, triadic, analogous…) or at random, lock favourites and export CSS. Tints and Shades Generator Generate tints, shades and tones of any colour plus a 50–950 scale, and export CSS variables, SCSS or a Tailwind theme. CSS Animation Generator Generate CSS @keyframes animations — fade, slide, zoom, bounce, pulse, shake, spin and more — with duration, delay, easing and loop controls. CSS Background Pattern Generator Generate repeating CSS background patterns — stripes, polka dots, checkerboard, grid, zigzag and more — using only gradients, no images. CSS Border Radius Generator Set border-radius per corner in px or %, or shape organic blobs with the 8-value "fancy" border-radius syntax. Live preview and copyable CSS. CSS Box Shadow Generator Design layered CSS box-shadows with sliders for offset, blur, spread, colour and opacity. Supports inset shadows, presets and a Tailwind class. Glassmorphism CSS Generator Build a frosted-glass (glassmorphism) card with backdrop-filter blur, transparency, saturation and border. Preview it over different backdrops. LESS Compiler Experiment with LESS syntax in an online compiler: live CSS output, highlighted error lines and an optional minified result. LESS Formatter Beautify LESS stylesheets online, including variables, mixins and nested rules. LESS to CSS Converter Convert LESS to CSS online. Compiles variables, mixins and nesting into plain CSS. LESS to SASS Converter Convert LESS to SASS online. Rules sharing a selector are nested automatically. LESS to SCSS Converter Convert LESS to SCSS online. Rules sharing a selector are nested automatically.