Free Online CSS Animation Generator with Keyframes
Build a CSS animation as it is really written: a keyframes block with as many stops as you need, and the animation shorthand that drives it. Set duration, delay, timing function with an editable cubic-bezier, iterations, direction, fill mode and play state, then watch a real box run it.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Build a CSS Animation
A few steps, and nothing is uploaded.
What to Know About CSS Animations
Including which properties are cheap to animate and which are not.
animation takes name, duration, timing function, delay, iteration count, direction, fill mode and play state. Duration and delay are both times, and the first time value found is the duration, so animation: fade 0s 2s is not a two second animation. This page writes them in the correct order with both units present, so the rule cannot be misread.
none, the element returns to its unanimated state the moment the animation finishes, and it also sits in that state during a delay. forwards keeps the last keyframe, backwards applies the first one during the delay, and both does the two together, which is usually what an entrance animation wants.
prefers-reduced-motion media query around the result. If the animation is decorative, wrap it in that query yourself, because some people get motion sick from movement you find subtle.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the CSS Animation Generator
A CSS animation is two pieces of code that have to agree with each other: a @keyframes block that describes the movement, and an animation property that says how to play it. Most generators give you one or the other. This page keeps them together, because the name links them and a typo in that name is the most common reason nothing happens at all.
The preview is a real animation. The keyframes block is written into a stylesheet in the page and applied to the box, so the timing function, the direction and the fill mode behave exactly as they will in your project. That also means the restart button has to do the trick every developer eventually learns: remove the animation, force the browser to reflow, then put it back, because reapplying the same rule does nothing.
The stop properties are deliberately limited to transform, opacity and background colour. That is not laziness. Transform and opacity are the two things a browser can animate without redoing layout or painting, so an animation built from them stays smooth on a phone, while one built from width and top does not. Background colour is there because interfaces do need it, and it is worth knowing it costs more.
Frequently Asked Questions
Timing functions, fill modes, restarting and reduced motion.
transform: scale() gets a similar visual result on the compositor, though it also scales the content, so it suits boxes and badges better than text blocks.@media (prefers-reduced-motion: reduce) query and turn it off, or shorten it to a simple fade. This tool does not add that for you, so it is worth doing by hand. Movement that feels gentle to you can make someone else feel unwell, and the operating system setting is how they tell you.