A CSS easing cubic-bezier generator creates a valid transition-timing-function from four control coordinates: x1, y1, x2, and y2.
The CSS Cubic Bezier Generator turns those coordinates into an exact CSS declaration while showing the curve, five input-to-output samples, and a moving preview. It is designed for creating and checking one timing function without hiding the values behind an animation preset.
Because the tool focuses on the timing function alone, you still need to choose the animated property, duration, delay, and any reduced-motion behavior in your own CSS.

What the Generator Produces
A cubic-bezier curve maps elapsed input progress to output progress. Every curve starts at the fixed point (0, 0) and ends at (1, 1). The four editable values define two intermediate control points: (x1, y1) and (x2, y2).
The x coordinates describe positions in input time. The y coordinates describe the animated value’s progress. This distinction matters because a curve does not necessarily reach its midpoint output when the curve parameter itself equals 0.5.
Results update immediately as a graph, an exact transition-timing-function declaration, five numeric samples, and a moving preview. The calculation stays in your browser: curve, CSS, and interaction data are not uploaded, stored, or sent to an animation service.
Create and Test an Easing Curve
- Choose a starting point. Select linear, ease, ease-in, ease-out, or ease-in-out, or enter x1, y1, x2, and y2 directly. Selecting a keyword loads its standardized control points, which can still be edited.
- Keep the coordinates within their supported ranges. The interface constrains x1 and x2 to the valid CSS interval from 0 through 1. It accepts finite y values from -10 through 10.
- Inspect the graph. Use its shape to judge whether the curve starts, stops, and changes speed as intended. The chart retains a stable zero-to-one frame for comparison.
- Review all five progress samples. Check the values at input progress 0, 0.25, 0.5, 0.75, and 1. These show how far the animated value has progressed at specific fractions of elapsed time.
- Run the motion preview. The Run control toggles a circle between two horizontal positions using a 900 millisecond transform transition and the exact generated easing string. Repeated clicks allow a forward-and-reverse comparison.
- Copy the complete declaration. The copied text includes the transition-timing-function property, all four coordinates, and a trailing semicolon. If clipboard access is denied, the declaration remains visible and selectable.
- Test the final interface. Apply the declaration to the real property, distance, and duration. The preview demonstrates timing, but it cannot reproduce every condition of the finished component.
Control Coordinates and Valid Ranges
| Value | Role in the curve | Accepted range | Practical effect |
|---|---|---|---|
| x1 and x2 | Input-time positions of the two intermediate control points | 0 through 1, inclusive | A value outside this interval makes the CSS cubic-bezier() declaration invalid. |
| y1 and y2 | Output-progress positions of the two intermediate control points | Finite values from -10 through 10 | Values below zero can create anticipation, while values above one can create overshoot. |
| Start and end | Fixed progress endpoints | (0, 0) and (1, 1) | Every CSS cubic-bezier() curve begins and ends at these points. |
The W3C CSS Easing Functions Level 1 defines the cubic-bezier() syntax, the x-coordinate validity rule, and the standardized keyword equivalents. The generator preserves those constraints and validates them independently before producing output.
The MDN cubic-bezier() reference provides browser-oriented examples of how the control coordinates affect a curve.
Allowing y coordinates outside the normal progress range does not make the curve invalid. It provides room for deliberate anticipation or overshoot. The important distinction is that x must represent valid input time, while y can describe output beyond the ordinary start-to-end interval.
Read the Graph, Samples, and Preview Together
| View | What it reveals | Important limitation |
|---|---|---|
| Graph | The overall shape and relative speed changes across the curve | An extreme y value can extend beyond the visible square without being clamped. |
| Five samples | Actual output values at 0%, 25%, 50%, 75%, and 100% input progress | The 50% sample is not necessarily the curve’s y value at a curve parameter of 0.5. |
| Run preview | How the generated timing feels during a 900 millisecond horizontal transform | It demonstrates timing rather than production performance under every workload. |
| CSS declaration | The exact cubic-bezier() values to place in transition-timing-function | It does not contain the property, duration, delay, or other transition settings. |
The sample table answers a question the control-point diagram alone cannot: how far has the animated value progressed when a particular fraction of time has elapsed? For each input, the solver finds the curve parameter whose x coordinate matches the requested input and then evaluates y. It uses bounded Newton iterations and finishes with bisection when necessary.
This process avoids treating the curve parameter as elapsed time when the x control points make those values different. It also means the samples remain useful when you need exact output progress rather than a visual impression.
Standard curves stay within the graph’s visible square. A deliberately extreme y coordinate can extend outside that stable frame, but the chart does not clamp the actual curve. The sample table and moving preview continue to use the computed easing, so inspect those views instead of interpreting an off-chart curve as a limited value.
Standard Presets and Exact Output
| CSS keyword | Equivalent cubic-bezier() controls |
|---|---|
| linear | cubic-bezier(0, 0, 1, 1) |
| ease | cubic-bezier(0.25, 0.1, 0.25, 1) |
| ease-in | cubic-bezier(0.42, 0, 1, 1) |
| ease-out | cubic-bezier(0, 0, 0.58, 1) |
| ease-in-out | cubic-bezier(0.42, 0, 0.58, 1) |
Choosing a keyword does not leave a hidden keyword in the result. The visible declaration always exposes all four numbers, making it possible to record, compare, and modify the curve without relying on an implicit default.
The calculation retains full JavaScript numeric precision. Numbers are rounded to three decimal places only when the declaration is serialized, so the visible CSS is compact while the underlying curve calculation remains precise.
Copy CSS requests clipboard permission and writes the complete declaration, including its semicolon. If browser policy blocks access, the status does not report success, but the text can still be selected manually.
Apply the Timing Function in CSS
Paste the copied declaration into a CSS rule. Keeping the property, duration, and timing function as separate longhand declarations makes the animation easier to inspect and adjust.
For example, a transform using the standardized ease-in-out controls can be written as: .control { transition-property: transform; transition-duration: 300ms; transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1); }
The 300 millisecond duration and transform property are application decisions, not values supplied by the generator. Its preview happens to use 900 milliseconds, so do not treat that preview duration as a recommended production setting.
After pasting the declaration, test the actual movement at its intended distance and duration. The same timing function can feel noticeably different when it drives opacity, translation, scale, or a large surface because the animated value and rendering work are different.
Limits That Shape the Final Motion
The generator does not create keyframes, spring physics, linear() stop lists, steps(), duration, delay, iteration count, or a complete transition shorthand. Its single-purpose output keeps the timing curve predictable and easy to audit, but it does not replace the rest of an animation implementation.
A technically valid curve can still be confusing or unsuitable. Large overshoots can make an animated control appear to reverse, leave its container, or reveal content that was expected to remain clipped. Keep important state changes understandable without motion, avoid rapid oscillation, and check focus and pointer behavior while an element is transitioning.
Respect reduced-motion preferences when animation is not essential. Also test the final component with its real property, distance, duration, rendering cost, input device, and surrounding motion, since each can affect how the curve is perceived.
The reliable workflow is to choose or enter the controls, inspect the graph and numeric samples, compare the preview, copy the exact declaration, and test it in the finished interface. Together, those checks answer what the curve looks like, how its progress is calculated, how the motion feels, and whether it belongs in production.
Related reading: Why a CSS Triangle Element Has Zero Width and Height.