Bezier Curve Editor
Online Bezier curve editor with draggable control points, easing presets, animation previews, and one-click CSS/JavaScript timing code generation.
Precise Values
Curve Editor
P1:(0.25, 0.10)
P2:(0.25, 1.00)
Easing Presets
Active Preset:Ease
Animation Preview
Translation
Scale
Rotation
R
Opacity
Timing Comparison
Current
Linear
Ease
Ease In
Ease Out
Back
CSS Code
/* CSS 动画 */
.animated-element {
animation: slide-in 2s ease infinite;
}
@keyframes slide-in {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
/* 或在 transition 中使用 */
.transition-element {
transition: transform 0.3s ease;
}JavaScript Code
// JavaScript 动画
const element = document.querySelector('.animated-element')
const duration = 2000
function easeBezier(t, p1x, p1y, p2x, p2y) {
const cx = 3 * p1x
const bx = 3 * (p2x - p1x) - cx
const ax = 1 - cx - bx
const cy = 3 * p1y
const by = 3 * (p2y - p1y) - cy
const ay = 1 - cy - by
function sampleCurveX(x) {
return ((ax * x + bx) * x + cx) * x
}
function sampleCurveY(x) {
return ((ay * x + by) * x + cy) * x
}
function solveCurveX(x) {
let t2 = x
for (let i = 0; i < 8; i += 1) {
const x2 = sampleCurveX(t2) - x
if (Math.abs(x2) < 0.001) break
const d2 = (3 * ax * t2 + 2 * bx) * t2 + cx
if (Math.abs(d2) < 0.000001) break
t2 -= x2 / d2
}
return t2
}
return sampleCurveY(solveCurveX(t))
}
function animate() {
const startTime = performance.now()
function frame(currentTime) {
const elapsed = currentTime - startTime
const progress = Math.min(elapsed / duration, 1)
const easedProgress = easeBezier(progress, 0.25, 0.1, 0.25, 1)
element.style.transform = 'translateX(' + (easedProgress * 200) + 'px)'
if (progress < 1) {
requestAnimationFrame(frame)
}
}
requestAnimationFrame(frame)
}
animate()Bezier Curve Editor Guide
Bezier Curve Editor helps you tune CSS easing visually with control-point dragging, presets, live previews, and copy-ready code for frontend animation workflows.
What is this tool?
It turns cubic-bezier control points into an interactive curve so you can drag points or enter exact coordinates and immediately see timing differences.
Key Features
- Drag P1 and P2 directly on the coordinate grid to tune easing curves quickly.
- Apply common presets like Linear, Ease, Back, Elastic, and Bounce in one click.
- Edit exact coordinate values for design-spec alignment and repeatable timing.
- Preview translation, scale, rotation, and opacity animations with the same curve.
- Generate and copy CSS and JavaScript timing snippets instantly.
How to Use
- Drag the curve handles or enter coordinate values for P1 and P2.
- Start from a preset if needed, then fine-tune the curve for your motion target.
- Play the preview to inspect translation, scale, rotation, and opacity behavior.
- Compare your curve against common easings in the timing comparison panel.
- Copy CSS or JavaScript output and apply it to your project.
Use Cases
- Frontend interaction animation tuning and debugging
- Shared motion-token setup for component libraries
- Design handoff timing alignment and implementation review
- Teaching easing principles in UI motion courses
Practical Tips
- Start with the closest preset to reduce trial-and-error time.
- If motion feels too aggressive, reduce extreme Y values and preview again.
- Validate timing on both desktop and mobile before shipping.
- Share cubic-bezier values with context notes when handing off to teammates.
Privacy Note
Your parameters and generated code stay in your browser. No data is uploaded to any server.