Before generating a CSS cubic-bezier, confirm that x1 and x2 are within 0–1, recognize that y1 and y2 can create anticipation or overshoot, and test the timing function against the real property, distance, and duration. A cubic-bezier describes how output progress changes as input time advances; it does not define an entire transition. Every curve starts at progress point (0, 0) and ends at (1, 1), while its two editable control points shape the path between them. The x coordinates control where those points sit in time, so CSS requires x1 and x2 to remain inside the closed zero-to-one interval. The y coordinates control output progress and may sit below zero or above one. That flexibility can make a response feel lively, but it can also make an element move beyond the expected value. Before generating code, decide what behavior you need, which limits you can defend, and how you will verify it in context. The CSS Cubic Bezier Generator keeps the curve, samples, declaration, and preview in one auditable workflow, but the final judgment still belongs in the interface where the animation will run.

Understand the curve before you shape it
The four values in cubic-bezier(x1, y1, x2, y2) describe two intermediate control points. They are not keyframe positions, and they do not specify which CSS property moves. The first point is (x1, y1), and the second is (x2, y2). The CSS Easing Functions Level 1 specification defines the syntax, the x-coordinate restriction, and the standardized keyword mappings.
Think of the horizontal axis as normalized input time and the vertical axis as output progress. Input time always moves from zero to one, while output progress tells the browser how far the animated value has progressed at that moment. The curve is fixed at (0, 0) and (1, 1); only the two intermediate points can be edited. This separation explains both the validity rule and the visual character of the resulting motion.
| Curve part | What it controls | Generator input range | Practical consequence |
|---|---|---|---|
| x1 and x2 | Input-time positions of the control points | 0 through 1, inclusive | Values outside this range make the CSS cubic-bezier invalid. |
| y1 and y2 | Output progress at the control points | Finite values from -10 through 10 | Values below zero can create anticipation; values above one can create overshoot. |
| Start and end points | Initial and final progress | Fixed at (0, 0) and (1, 1) | Every generated timing function begins and ends at the normalized boundaries. |
Start from intent, not from a favorite number
The generator provides five keyword presets: linear, ease, ease-in, ease-out, and ease-in-out. Their control points come from CSS Easing Functions Level 1. Linear maps directly to (0, 0, 1, 1), while the other buttons load their standardized cubic-bezier equivalents. This gives you a dependable baseline before deciding whether a custom curve is necessary.
Selecting a keyword does not leave a hidden keyword in the result. The visible and copyable declaration always exposes all four numbers, so the curve can be recorded, compared, and modified without relying on browser defaults. Begin with the preset that most closely matches the intended response, then identify the specific behavior you want to change. A custom y value is useful when deliberate anticipation or overshoot has a clear purpose; otherwise, a standard curve is usually easier to explain and maintain.
Using a preset also gives you a concrete reference point. If a custom adjustment does not produce a visible or measurable improvement, returning to the standardized control points is simpler than carrying unnecessary complexity into production CSS.
Generate, inspect, and copy the declaration
- Choose a preset or enter the four control coordinates. Select one of the five standard easing buttons, or enter x1, y1, x2, and y2 directly. The interface keeps the x inputs within the valid CSS range and accepts finite y values from -10 through 10. Before output is produced, the underlying calculation independently validates those constraints.
- Review the graph, numeric samples, and Run preview. The graph shows the parametric curve from the fixed start to the fixed end, the table reports output progress at input values 0, 0.25, 0.5, 0.75, and 1, and Run previews the exact generated easing. Use all three views because each answers a different question: shape, measurable progress, and perceived motion.
- Copy the complete declaration and test it in context. Copying requests clipboard permission and writes the full transition-timing-function: cubic-bezier(x1, y1, x2, y2); declaration, including its semicolon. If browser policy denies clipboard access, the declaration remains visible and selectable, and the status does not report a false success. Apply the timing function to the real property, distance, and duration rather than judging it only inside the generator.
Read progress samples as time, not as curve parameters
The numeric table answers a question the control-point diagram cannot: how far has the animated value progressed when a particular fraction of time has passed? For each input value, the solver first finds the curve parameter that produces the requested x coordinate and then evaluates y at that parameter. It uses bounded Newton iterations and switches to bisection when necessary.
That distinction matters. The result shown for 50 percent input time is not necessarily the curve's y value when the internal curve parameter equals 0.5. When the x control points change, curve parameter and elapsed time no longer coincide. The MDN cubic-bezier() reference describes the same browser-oriented behavior in more detail.
Use the samples to compare candidates rather than relying only on how a curve looks. At 50 percent input time, an output below 0.5 means the animated value has progressed less than halfway, while an output above 0.5 means it has progressed farther. The quarter-time samples help distinguish a curve that begins slowly from one that advances quickly and then settles. When anticipation or overshoot matters, check whether the calculated outputs extend below zero or above one rather than assuming that every visible motion remains between the chart boundaries.
The graph keeps a stable zero-to-one square so ordinary curves can be compared. A deliberately extreme y value may extend outside that visible square, but the value is not being clamped. The sample table and moving preview still use the actual calculated easing. Inspect those views when overshoot matters rather than assuming that a curve outside the chart frame has been limited to the square.
Compare a preset and a custom curve systematically
When deciding whether a custom curve is worthwhile, change one part of the behavior at a time. Start with a standard preset, record the five progress samples, and note the shape and midpoint progress. Then adjust a control coordinate and repeat the same inspection. This makes it easier to identify whether the change produces a meaningful timing difference or merely a different-looking path.
The same comparison applies to acceleration and deceleration. The x coordinates determine where the two control points occur along input time, so moving them can change when the curve bends. The y coordinates determine the output values associated with those points, so changing them can alter anticipation, overshoot, or the amount of visible movement around a particular point in the transition. Because these roles are separate, changing an x value should be evaluated as a timing change, while changing a y value should be evaluated as a progress change.
Do not assume that a curve which looks balanced in the square will feel balanced in the final interface. A short movement can hide a late or abrupt change, while a long movement makes every stage of the timing easier to perceive. Compare candidates at the duration and distance you actually plan to use, and keep the coordinate values documented with the component so the result can be reproduced later.
Judge motion in the context it will animate
Run preview toggles a circle between two horizontal positions with a 900-millisecond transform transition using the exact generated easing string. Repeated clicks allow a forward-and-reverse comparison. This is a controlled timing sample, not a guarantee of production performance. A real component can feel different when its distance, duration, animated property, rendering cost, input device, or surrounding motion changes.
Install the copied timing function in the final interface and observe the complete interaction. A valid curve is not automatically accessible, performant, or appropriate. Large overshoots can make controls appear to reverse, leave their 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 to the task.
If the preview and the production component disagree, troubleshoot problems when generating a CSS cubic-bezier by checking the copied coordinates, the property being animated, and the surrounding transition settings separately. That makes it easier to identify whether the issue is the timing function or its implementation context.
Know the boundary between easing and a complete transition
This generator focuses on one timing function. It does not generate keyframes, spring physics, linear() stop lists, steps() timing, duration, delay, iteration count, or a full transition shorthand. You still need to select the animated property and its transition settings. Keeping those decisions separate makes the easing easier to audit and reuse across multiple transitions.
The serialized coordinates are rounded to three decimal places only when the declaration is written, while the underlying calculation retains full JavaScript numeric precision. The visible output is therefore a concise, standards-compatible declaration based on the validated calculation. If exact values matter to your documentation, compare the copied declaration rather than treating the three-decimal serialization as the internal calculation itself.
Check privacy and output handling
All curve calculation happens in the browser. No curve, CSS, or interaction data is uploaded, stored, or sent to an animation service. Copy CSS requests clipboard permission. If access is denied, the declaration remains visible and selectable, so it can still be copied manually in a locked-down browser environment.
Run a final pre-generation checklist
- State the intended motion before choosing coordinates.
- Confirm that x1 and x2 remain between zero and one.
- Use y values below zero or above one only for a deliberate overshoot or anticipation effect.
- Start from a standard preset when possible and document any custom change.
- Check the graph for shape, the numeric table for progress, and Run preview for perceived timing.
- Compare the five samples at 0, 0.25, 0.5, 0.75, and 1 before settling on a curve.
- Copy the complete declaration, including all four coordinates and the semicolon.
- Test the real property, travel distance, duration, and surrounding interface.
- Verify that content is not unexpectedly clipped and that focus, pointer behavior, and reduced-motion needs remain sound.
If you're weighing options, What to Do If You Cannot Generate a CSS Toggle Switch covers this in detail.