CSS Animation

CSS Animation Generator

Pick an effect, tune its timing and behaviour, and watch it play. The preview runs the same @keyframes and animation CSS you copy, and every value is checked before it is used.

Back

1. Effect & timing

Strictly validated values

2. Live preview

Uses the generated CSS

Generated code

@keyframes + animation

The box colour and size in the preview are demo styling — Download HTML includes them in a separate block, but they are not part of the CSS above.

About this tool

About CSS Animation Generator

CSS Animation Generator creates @keyframes animations with a live preview. Choose fade, slide, scale, rotate, bounce, pulse, shake or a custom transform, then set the animation name, duration, delay, timing function (including cubic-bezier and steps), iteration count, direction, fill mode, play state and transform origin. Every value is checked against strict patterns, and the preview runs the same CSS you copy.

Small animations make interfaces feel responsive and guide attention, but keyframes and timing functions are fiddly to write and tune by hand. Experimenting visually and copying finished CSS saves time, and the optional reduced-motion rule helps keep animations accessible.

How to use

Step by step

  1. Choose an effect and, where offered, its variant and amount.
  2. Set the animation name, duration, delay and timing function.
  3. Choose iterations, direction, fill mode and transform origin.
  4. Type the text for the preview element and use Play, Pause and Replay to check the motion.
  5. Keep the reduced-motion option on unless you have a reason not to.
  6. Copy or download the CSS and HTML.
Key features

What it offers

  • Fade, slide, scale, rotate, bounce, pulse and shake presets
  • Custom transform with strictly validated functions
  • Duration, delay, timing function, cubic-bezier and steps
  • Iteration count or infinite, direction, fill mode and play state
  • Transform origin keywords or custom values
  • Play, Pause and Replay controls
  • Optional prefers-reduced-motion rule
  • Copy and download CSS, HTML and a standalone demo page
Best practices

Tips for best results

  • Keep interface animations short — around 150–400 ms for most transitions.
  • Animate transform and opacity for the smoothest performance.
  • Avoid infinite animations on content people need to read.
  • Respect reduced-motion preferences, especially for large or bouncing movement.
  • Give each animation a descriptive name that won’t clash with other styles.
Benefits

Why people use it

See it move

A live preview of the exact CSS.

Safe values

Every input is validated before use.

Accessible

Reduced-motion support in one click.

Ready to paste

Clean @keyframes and animation properties.

FAQ

Common questions

Yes. The same keyframes and animation properties are applied to the preview element (with an internal keyframes name so it can’t clash with this page’s styles).
translate, translateX, translateY, scale, scaleX, scaleY, rotate, skew, skewX and skewY with numeric values — for example translateX(40px) rotate(15deg). Anything else is rejected, so no arbitrary CSS is ever applied.
Fill mode decides whether the first or last keyframe styles apply before and after the animation runs (forwards keeps the end state). Direction can play the animation backwards or alternate on each repeat.
Play and Pause switch animation-play-state between running and paused (and update the CSS to match). Replay restarts the animation from the beginning.
It adds a prefers-reduced-motion media query that turns the animation off for people who have asked their device to reduce motion — recommended for accessibility.
CSS animations and the properties used here are supported by all current major browsers. Very old browsers may not support every timing function.
Yes. It is shown as plain text in the preview and HTML-escaped in the generated markup.
Private by design

This runs entirely in your browser

No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.

Install Toolisco Add it to your device for offline, one-tap access.