CSS Animation Generator

Start from a fade, slide, bounce or shake, tune the timing and copy the keyframes. Set duration, delay and easing, and watch the preview as you go.

CSS Animation Generator

Website Tools

Runs locally in your browser.

Generate @keyframes and animation declarations with live preview. Runs locally.
CSS

About the CSS Animation Generator

Adding motion to a user interface improves the user experience, transforming a static web page into a lively environment. Writing CSS animations by hand is fiddly. Writing the @keyframes skeleton, determining the percentages, and constantly adjusting time properties such as duration and delay to achieve the desired effect require multiple cycles of editing and viewing in a browser. The CSS Animation Generator removes this trial-and-error process; you can generate an animation with a selected type of movement and then tweak its playback attributes on a visual editor. When satisfied, you can copy the CSS code directly to the clipboard.

Key Features of CSS Animation Generator

  • Keyframe presetsChoose a type such as Fade In instead of writing the @keyframes code yourself.
  • Precision Timing SlidersThe visual editor lets you fine-tune the duration of the animation and its delay using intuitive sliders.
  • Advanced Playback RulesControl the animation’s timing function, iteration count, direction, and fill mode using dropdowns.
  • Live PreviewThe live preview box shows the selected animation, and a dedicated button lets you replay it as the user would see it.
  • 100% Local ExecutionThe tool runs inside the browser, providing instant previews without waiting for server responses.
  • Instant Code ExportThe code is automatically generated and updated as you edit the animation, and you can copy or download it when done.

How to Use CSS Animation Generator

  1. Type or select an animation name and keyframe type to use as a starting point.
  2. Use the sliders to adjust the animation’s duration and delay.
  3. Use the dropdowns to select the timing function and iteration count.
  4. Use the dropdowns to select the animation’s direction and fill mode. Click the replay button to see a preview of the animation in the visual editor. Click the copy CSS button to copy the animation code to the clipboard.

CSS Animation Generator Examples

A one-second fade-in with its keyframes.

Input
Default options
Result
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.element {
  animation: fadeIn 1s ease 0s 1 normal none;
}

CSS Animation Generator — Frequently Asked Questions

What is a keyframe in CSS?
The @keyframes rule is used to define what parts of an animation occur at specific percentages. It is the foundation for all CSS animations, defining how the elements take one set of style values and transition to another set of values.
What does the fill mode do in CSS animation?
The animation-fill-mode is used to specify how the animation applies styles outside the normal animation timeline to the target element. It determines the values of the properties before the animation starts and after it ends.
Why CSS and not JavaScript?
Browsers can use the GPU for animations of transform and opacity, which helps them run smoothly. For simple effects, CSS animations are often lighter than a JavaScript animation library.