Use the CSS Cubic Bezier Generator when you cannot generate a valid CSS cubic-bezier curve: enter valid controls, inspect the timing, and copy the complete declaration. A manual curve can look plausible yet fail because CSS requires each x control coordinate to remain from zero through one, while the y coordinates control output progress and may extend beyond the usual range. The generator turns x1, y1, x2, and y2 into a standards-compatible timing function, keeps the fixed (0, 0) start and (1, 1) end, and immediately updates a graph, five progress samples, and a moving preview. You can begin with one of five standardized easing keywords or enter coordinates yourself. The visible output always exposes all four numbers, even after a keyword preset is chosen, so there are no hidden defaults to reconstruct. Copy the complete transition-timing-function declaration, including its semicolon, then test it with the actual property, travel distance, and duration in your interface. The tool creates timing only; it does not add duration, delay, keyframes, or a full transition. All calculation happens in your browser, and no curve, CSS, or interaction data is uploaded, stored, or sent to an animation service.

what should i do if i cannot generate css cubic bezier
What To Do If You Cannot Generate CSS Cubic Bezier

What makes a cubic-bezier value valid

A cubic-bezier() timing function maps elapsed input progress to output progress. Its curve always begins at point (0, 0) and ends at (1, 1); the editable values x1, y1, x2, and y2 are the two intermediate control points. The x coordinates locate those points in input time, so CSS requires both x1 and x2 to stay in the closed range from 0 to 1. The y coordinates describe output progress and may fall below 0 or rise above 1, creating anticipation or overshoot.

The generator constrains x inputs to that valid CSS range. Its interface accepts finite y values from −10 through 10, and the calculation independently validates those constraints before producing output. Those y limits belong to the generator interface; they are not the same as the CSS rule that x coordinates must remain from 0 to 1.

CSS keyword x1, y1, x2, y2 Standard timing behavior
linear 0, 0, 1, 1 Constant-rate progression
ease 0.25, 0.1, 0.25, 1 General smooth acceleration and deceleration
ease-in 0.42, 0, 1, 1 Gradual start
ease-out 0, 0, 0.58, 1 Gradual finish
ease-in-out 0.42, 0, 0.58, 1 Gradual start and finish

These mappings are defined by W3C CSS Easing Functions Level 1, while MDN’s cubic-bezier() reference provides browser-oriented syntax and examples. Use a preset when its timing already fits the intended motion; choose custom coordinates when you need more deliberate control.

Selecting a keyword does not make the keyword itself the visible output. The declaration exposes all four control values so you can record, compare, and modify them. Numbers are rounded to three decimal places only when the declaration is serialized; the calculation retains full JavaScript numeric precision.

Generate and copy a usable timing declaration

  1. Open the generator. Go to the CSS Cubic Bezier Generator, where the four control coordinates, preset buttons, graph, samples, preview, and output are available together.
  2. Choose a preset or enter coordinates. Select linear, ease, ease-in, ease-out, or ease-in-out when one matches the goal. For custom entry, set x1, y1, x2, and y2. Keep both x coordinates from 0 to 1 and use finite y coordinates from −10 through 10 in the generator.
  3. Review the curve and its behavior. Check the graph for the overall shape, inspect the five numeric progress samples, and use Run preview to watch the generated easing. Look for acceleration, deceleration, anticipation, overshoot, or confusing changes in direction.
  4. Copy the complete declaration. Use the copy control to place the full transition-timing-function declaration, including its semicolon, on the clipboard. Browser policy may request clipboard permission. If access is denied, the declaration remains visible and selectable, and the status will not claim that copying succeeded.
  5. Test it in the real component. Apply the generated timing function to the actual transition and exercise the property, distance, and duration used by the interface. A successful preview does not replace testing in the final design.

The output is intentionally limited to one timing function. It does not generate a keyframe sequence, spring model, linear() stop list, steps() timing, duration, delay, iteration count, or complete transition shorthand.

Check the graph, samples, and motion

The graph uses a stable zero-to-one square so ordinary timing curves can be compared without the frame changing size. Standard curves remain inside that frame. An extreme y coordinate can make part of the curve extend outside the visible square, but that does not mean the result has been clamped or limited to the graph boundary. Use the numeric samples and moving preview to inspect the actual easing in those cases.

The five samples answer a question the control-point diagram alone cannot: how far has the animated value progressed at a given fraction of elapsed input time? Inputs are evaluated at zero, 0.25, 0.5, 0.75, and one. For an input such as 0.5, the solver first finds the curve parameter whose x coordinate is 0.5, then evaluates y at that parameter. It uses bounded Newton iterations and finishes with bisection when necessary, avoiding the incorrect assumption that the curve parameter always equals elapsed time.

Run preview toggles a circle between two horizontal positions using a 900-millisecond transform transition and the exact generated easing string. Repeated clicks let you compare forward and reverse motion. This preview demonstrates timing rather than guaranteed production performance: distance, duration, animated property, rendering cost, input device, and surrounding motion can make the final component feel different.

Fix the reasons a result seems missing or wrong

Separate coordinate validity, clipboard delivery, and motion suitability. A curve can be rejected as invalid, copied without confirmation, or accepted by CSS but still be unsuitable for the interface.

Symptom What it means What to do
An x coordinate cannot be set below 0 or above 1 The proposed value would be invalid CSS Return x1 or x2 to the closed 0-to-1 range
A y coordinate is not accepted It is outside the generator’s accepted finite range Use a finite value from −10 through 10
The curve extends outside the square An extreme y value creates progress beyond 0 or 1 Inspect the samples and motion; do not assume clamping
The copy control does not confirm success Clipboard permission may have been denied Select and copy the still-visible declaration manually
The 50% sample is unexpected The curve parameter and elapsed input progress are not necessarily equal Use the x-axis input and computed output shown in the table

A technically valid curve is not automatically understandable, accessible, performant, or appropriate. Large overshoots can make controls appear to reverse, move outside their container, or reveal content expected to remain clipped. Although the moving element and numeric samples use the actual computed easing, avoid rapid oscillation and check focus and pointer behavior while an element is transitioning.

If the generated coordinates are valid and the samples describe the progress you intended, the remaining problem is usually context rather than generation. Test the actual layout and interaction instead of changing the curve solely to match the fixed preview circle.

Test the declaration where it will actually run

The copied line supplies timing; it does not create movement by itself. Use it as the value of transition-timing-function, then configure the animated property and duration separately. For the distinction between generated timing and a complete CSS declaration, see CSS Cubic Bezier Generator: Full Transition or Just Timing?.

Test both the forward and reverse states on the real property and distance. Also check the intended duration, rendering demands, input method, and any motion occurring nearby. The preview’s fixed 900-millisecond circle cannot reproduce every production condition.

Respect reduced-motion preferences where animation is not essential. Important state changes should remain understandable without motion, and moving controls should not interfere with focus or pointer input. Once the curve looks purposeful in its real setting, copy the same visible declaration into the project and record its four control values for easier comparison and maintenance.

Related reading: What to Compare Before You Generate a CSS Toggle Switch.