Skip to content
ToolsOnDuty - free online tools

Search tools

Loading tool search...

CSS & Design

CSS Animation Generator

Build CSS keyframe animations with a live preview and copy the CSS.

Free browser toolRuns in your browserNo sign-up
CSS
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.element {
  animation: bounce 1s ease infinite;
}

About the CSS Animation Generator

CSS animations bring interfaces to life with keyframes, but writing them by hand is fiddly.

This generator offers ready-made effects - fade, slide, bounce, spin, pulse and shake - with duration, timing and iteration controls, a live preview and a replay button, then outputs the CSS with keyframes.

It runs in your browser.

Key features

  • Fade, slide, bounce, spin, pulse and shake
  • Duration, timing and iteration
  • Live preview with replay
  • Copy CSS with keyframes

How to use

  1. 1Choose an effect and settings.
  2. 2Preview it and replay if needed.
  3. 3Copy the CSS including keyframes.
  4. 4Duration is the length of one cycle, from 0.2s to 5s. Select 1, 2 or 3 iterations for a finite run, or infinite to repeat continuously.
  5. 5Use Replay to restart a finite preview after it finishes. Copy both the named @keyframes and the .element rule, then apply that class or adapt the selector in your stylesheet.
  6. 6The generator does not add a reduced-motion rule or animation-fill-mode. Add those in your project if you need a motion alternative or a particular appearance after a finite animation ends.

Examples

Bounce
Output: animation: bounce 1s ease infinite;

The element moves up and down continuously using two keyframes.

Frequently asked questions

Are the keyframes included?
Yes. The output has both the @keyframes block and the animation shorthand, ready to paste into your stylesheet.
Can I loop the animation?
Yes. Set iterations to infinite for a continuous loop, or a fixed number to play it a set number of times.
How do I trigger it once on load?
Set iterations to 1 and apply the class to the element; it plays once when the element renders.

Open a related tool to prepare your files or refine the finished result.