CSS animation generator
Choose an animation such as fade in, slide up, zoom, bounce, pulse, shake, spin, flip, swing, heartbeat or wobble, adjust its duration, delay, easing, distance, repeat count, direction and fill mode, and watch it play on a live preview box. The generator writes a named @keyframes rule and the animation shorthand for your selector, plus a prefers-reduced-motion rule that turns the animation off for people who have asked their device for less motion. The CSS uses only transform and opacity, which browsers can animate smoothly without slowing the page.
How to use the CSS Animation Generator
- 1
Choose a preset
Entrance, attention or loop effects.
- 2
Tune the timing
Duration, delay, easing, repeats, direction and distance.
- 3
Copy the CSS
Paste it into your stylesheet and add the class to an element.
When to use it
- Animate elements entering the page.
- Draw attention to a button or badge.
- Make a loading spinner or pulse.
Limits
- One animation per element; combine them by hand if you need more.
- Scroll-triggered animation needs a little JavaScript or the newer scroll-timeline CSS.
Privacy
Runs in your browser; nothing is uploaded.
Frequently asked questions
Why only transform and opacity?
Browsers can animate these on the GPU without recalculating layout, so animations stay smooth and don’t hurt Core Web Vitals.
What does fill mode do?
It decides whether the first or last keyframe styles apply before or after the animation runs. “both” is usually what you want for entrance effects.
What is the reduced-motion rule?
Some people get dizzy or distracted by motion and switch on “reduce motion” in their system settings. The extra rule disables the animation for them.
How do I replay an animation with JavaScript?
Remove the class, force a reflow (for example read element.offsetWidth) and add the class again.
Can I rename the animation?
Yes. Enter a name; it is cleaned to a valid CSS identifier.
Related tools
- CSS Gradient GeneratorLinear, radial and conic CSS gradients with colour stops, live preview and copyable CSS.
- SVG Pattern GeneratorDesign a seamless SVG background pattern and copy it as CSS or an SVG file.
- HTML Live EditorEdit HTML, CSS and JavaScript side by side with an instant, sandboxed preview.
People also use
- JWT Generator & SignerCreate and sign JSON Web Tokens with HMAC, RSA or ECDSA keys, entirely in your browser.
- Base64 Encoder & DecoderEncode and decode Base64 and Base64url, text or files.
- URL Encoder & DecoderPercent-encode or decode URLs and see their query parameters.
- CSV to JSON ConverterConvert CSV ⇄ JSON with correct quoting, types and nested data.
Last updated November 24, 2026 · How we build and test our tools