Home/Tools/Animations/Animation Generator
Animations · Generator

Animation Generator

Create custom CSS keyframe animations with visual timeline editor.

Animation Preset

Timing

1s
0s

Behavior

Preview

Generated CSS
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.animated {
  animation: bounce 1s ease 0s infinite normal;
}
100%
Free, no
sign-up needed
0
Code written
by hand
85+
CSS tools
in one place
<1s
Copy-ready
CSS instantly
What is this

What is the CSS Animation Generator?

Build CSS keyframe animations with a visual editor. Set timing, easing, iteration, and fill mode, then copy the complete @keyframes and animation declaration.

Everything runs locally in your browser. Adjust the controls above, preview instantly, and copy clean, production-ready CSS — no account, no upload.

How to use

Using the CSS Animation Generator

Everything lives in the panel at the top of this page. There is nothing to install — it all runs right here in your browser.

1

Choose an animation type

Select from fade, slide, scale, rotate, bounce, or custom. The preview shows the animation immediately on a sample element.

2

Set timing and easing

Adjust duration, delay, easing curve, and iteration count. Toggle fill-mode between none, forwards, backwards, and both.

3

Copy the CSS

Click Copy to get the @keyframes block and the animation property declaration together, ready to paste.

The output

What the generated code looks like

Clean, production-ready CSS — no vendor bloat, no unnecessary declarations.

styles.css
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.4s ease-out both;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}

Always include a prefers-reduced-motion media query. Some users experience motion sickness from animations.

Pro tips

Pro tips for better results

Keep animations under 300ms for UI feedback

Button clicks and state changes feel snappy at 150-200ms. Page transitions work at 250-350ms. Longer animations feel slow and frustrate repeat users.

Animate transform and opacity only for 60fps

transform and opacity are composited on the GPU and do not trigger layout or paint. Animating width, height, margin, or background-color forces reflow and causes jank.

animation-fill-mode: both is usually what you want

both applies the from values before the animation starts (during the delay) and the to values after it ends. This prevents elements from snapping back to their original state.

Add will-change: transform for complex animations

will-change: transform hints to the browser to promote the element to its own compositor layer, reducing jank on complex animations. Remove it after the animation completes with JavaScript.

Always include prefers-reduced-motion

Users who have enabled reduced motion in their OS accessibility settings should not see animations. Wrap animations in @media (prefers-reduced-motion: no-preference) or disable them with @media (prefers-reduced-motion: reduce).

FAQ

Frequently asked questions

A transition reacts to a state change (hover, focus, class toggle) - it has a start state and an end state. An animation runs on its own timeline with @keyframes, can loop, can have multiple steps, and does not need a state change trigger.
Likely caused by animating layout properties. Replace width/height with transform: scaleX()/scaleY(), replace top/left with transform: translate(), and replace opacity changes on layout-affecting wrappers with separate elements.
No. Everything runs in your browser. Nothing is sent to a server.

From the blog

Read more