💻 Web Dev Tools

CSS Animation Generator

Generate CSS keyframe animations visually. Pick a preset or build your own keyframes. Interactive cubic-bezier editor, 12 presets, live preview on 4 element shapes, scrubber to inspect any frame. Copy production-ready @keyframes CSS instantly.

12 animation presets Custom keyframe builder Interactive cubic-bezier editor Live preview + scrubber
AdSense — 728×90 Leaderboard

CSS Animation Generator Tool

Preset animations
Timing & behaviour
Easing function
cubic-bezier(0.4, 0, 0.2, 1)
Keyframes
Scrub: 0%
Generated CSS
AdSense — 728×90 Leaderboard
💥
Need to generate a box shadow for your animated element?
The free CSS Box Shadow Generator lets you build multi-layer shadows visually with Material Design and Tailwind presets. A natural companion for polishing animated UI elements.
💥 Box Shadow Generator →
⭐ User Ratings

Rate this tool

4.8
Based on 3,192 ratings
5
2,777
4
255
3
96
2
32
1
32
Was this animation generator helpful?
Thank you for your rating!
Features

Custom keyframe builder, cubic-bezier editor, scrubber — features most CSS animation generators skip

Most online CSS animation generators let you pick a preset and copy the code. This tool adds a custom keyframe builder where you define your own percentage stops and transform values, an interactive cubic-bezier curve editor with drag control points, and a scrubber to inspect any frame of the animation.

🎬
12 animation presets
Fade In/Out, Slide Left/Right/Up/Down, Bounce, Spin, Pulse, Shake, Zoom In/Out. Each preset loads production-ready @keyframes. Click any preset to apply it instantly to the live preview. Most tools stop at 8 presets.
📏
Custom keyframe builder
Add your own percentage stops — 0%, 25%, 50%, 75%, 100% — and set transform values (translateX/Y, rotate, scale, opacity) at each stop. The CSS output updates in real time. Absent on most free tools where only the preset keyframes are available.
📉
Interactive cubic-bezier editor
Drag the two control points on the bezier canvas to shape your easing curve. The cubic-bezier() value updates as you drag and is applied to the preview immediately. Eight easing presets (ease, linear, ease-in, ease-out, ease-in-out, Material, iOS spring, Bounce) load into the editor with one click.
🔍
Timeline scrubber
Drag the scrubber to pause the animation and inspect any frame between 0% and 100%. Uses the CSS animation-delay negative-offset technique to freeze the element at the exact moment you choose — no JavaScript pausing needed. Useful for fine-tuning transforms at specific frames.
🟦
4 preview shapes
Preview your animation on a square box, circle, gradient text, or a realistic card component. Switch shapes without restarting the animation. Lets you see how the animation feels on different UI element types before copying the code.
📋
Production-ready CSS output
The output includes the complete @keyframes rule and the animation shorthand property with all settings — duration, delay, timing-function, iteration-count, direction, fill-mode. Copy @keyframes only, or copy everything. Paste directly into your stylesheet with no edits needed.
How to use

How to generate CSS keyframe animations

1
Pick a preset or start from scratch
Click any of the 12 preset buttons to load a common animation — Fade In, Bounce, Slide Left, Spin and more. The live preview and code output update instantly. Or leave the preset deselected and build your own animation from scratch using the keyframe builder.
2
Adjust timing and behaviour
Use the Duration slider (0.1s–5s), Delay slider, and Iteration slider (1–10, or 0 for infinite). Set Direction (normal, reverse, alternate) and Fill mode (forwards keeps the end state, none resets). All changes apply to the preview immediately.
3
Shape the easing curve
Click an easing preset pill (ease, linear, ease-in-out, etc.) or drag the two control points on the cubic-bezier canvas to create a custom curve. The cubic-bezier() value shown below the canvas is used in the generated CSS. Material Design uses (0.4, 0, 0.2, 1) — the default.
4
Build custom keyframes (optional)
Click “+ Add keyframe stop” to add a custom percentage stop. Each stop shows its position and transform. Adjust the values in the generated CSS directly, or use the preset keyframes as a base. The custom keyframes replace the preset @keyframes in the output.
5
Copy and paste into your CSS
Click “Copy @keyframes” to copy just the @keyframes rule, or “Copy all” for the complete block including the animation shorthand. Add the animation class to your HTML element and paste the CSS into your stylesheet. No JavaScript, no libraries required.
Quick reference

CSS animation properties explained

PropertyValuesWhat it controls
animation-duration1s, 500ms, 2.5sTotal time for one cycle of the animation
animation-delay0s, 0.5s, -1sTime before animation starts (negative = start partway through)
animation-timing-functionease, linear, cubic-bezier()The pace curve — how properties change over time within each keyframe interval
animation-iteration-count1, 3, infiniteHow many times the animation plays
animation-directionnormal, reverse, alternateWhether each cycle runs forward, backward, or alternates
animation-fill-modenone, forwards, backwards, bothWhether element retains animation styles before start or after end
animation-play-staterunning, pausedToggles the animation on/off — useful for pause-on-hover
@keyframes0%, 50%, 100%, from, toDefines property values at specific points along the animation timeline
Complete guide

CSS Keyframe Animation — A Complete Guide for Developers

CSS animations let you animate HTML elements by transitioning between a sequence of style states — called keyframes — over time. Unlike CSS transitions, which only animate between two states when triggered by user interaction, @keyframes animations can define multiple intermediate states, run automatically when the page loads, loop indefinitely, and reverse direction. Used correctly, they create polished micro-interactions, entrance effects, loading states and attention-grabbing UI elements without any JavaScript.

CSS keyframe animation generator online free

The @keyframes rule defines the animation sequence. Each percentage stop (0%, 25%, 50%, 100%) or keyword (from, to) specifies what CSS properties the element should have at that point in the animation. The browser automatically interpolates (tweens) between the keyframe values to create a smooth motion. The animation property — applied to the element — binds the @keyframes rule to the element and controls its duration, timing, repetition and behaviour.

Visual CSS animation maker with preview

Writing @keyframes by hand requires knowing exact property names and values, calculating transform sequences mentally, and constantly switching between editor and browser to see the result. A visual animation maker closes this loop: you adjust sliders and see the preview update immediately, without any save-and-refresh cycle. The cubic-bezier editor is particularly valuable — instead of guessing values for a custom timing curve, you drag control points and see exactly how the easing shape changes the animation’s feel in real time.

CSS bounce fade slide animation generator

The most frequently used animation effects in web design are: Fade (opacity 0→1 or 1→0) for entrances and exits. Slide (translateX or translateY) for elements entering from an edge. Bounce (translateY with overshoot at 40% and 60%) for playful attention effects. Spin (rotate 0deg→360deg) for loading indicators. Pulse (scale 1→1.05→1) for drawing attention to a badge or notification dot. All of these use only transform and opacity, which are GPU-accelerated and do not trigger layout recalculation — the key performance principle for smooth 60fps animations.

CSS animation code generator with cubic-bezier

The timing function is one of the most powerful and underused tools in CSS animation. ease (the default) starts slow, accelerates, then decelerates — it works for most UI animations. linear moves at constant speed and is ideal for continuous rotations. ease-in accelerates through the animation — used for elements leaving the screen. ease-out decelerates — ideal for elements arriving. cubic-bezier() gives you full control over the acceleration curve: the four values define two control points on a bezier curve. Material Design’s standard easing is cubic-bezier(0.4, 0, 0.2, 1) — a fast departure and gradual arrival that feels natural and responsive.

@keyframes generator online

The @keyframes rule follows this exact structure: @keyframes animation-name { percentage { CSS properties } }. The name is arbitrary and referenced in the animation property. Percentages can be any value from 0% to 100%, and multiple percentages can share the same declaration block (e.g., “0%, 100% { opacity: 1; }”). The from keyword is equivalent to 0%, and to is equivalent to 100%. Only properties that are interpolatable (numeric or colour values) can be animated — display, visibility and similar properties switch abruptly rather than animating.

Frequently asked questions

A CSS keyframe animation defines how an element’s CSS properties change over time using the @keyframes rule. You specify property values at specific percentages of the animation duration, and the browser smoothly interpolates between them. Unlike CSS transitions, keyframe animations run automatically, can loop, and can have multiple intermediate states.
CSS transitions animate between two states and require a trigger (hover, class change). CSS animations use @keyframes to define multiple intermediate states and can run automatically on page load, loop indefinitely, reverse direction, and play without any user interaction. Use transitions for hover effects and simple state changes; use animations for entrance effects, loading indicators, and multi-step sequences.
Animate transform and opacity for 60fps performance. These are handled by the GPU compositor thread and do not trigger layout or paint. Use translateX/translateY instead of left/top for movement. Use scale instead of width/height for size changes. Animating width, height, margin, padding, or top/left forces layout recalculation on every frame and can cause jank, especially on mobile.
animation-fill-mode controls what styles apply to the element before and after the animation. forwards keeps the end state (100% keyframe) after the animation finishes — use this for entrance animations so the element doesn’t snap back. backwards applies the start state (0% keyframe) during the delay period. both applies both rules. none (the default) resets the element to its original styles before and after.
A cubic-bezier timing function defines the acceleration curve of an animation using four values: cubic-bezier(x1, y1, x2, y2). The values define two control points on a bezier curve that maps animation progress (time) to property change. ease is cubic-bezier(0.25, 0.1, 0.25, 1). Material Design’s standard easing is cubic-bezier(0.4, 0, 0.2, 1). Use the interactive curve editor above to shape your own.
Use animation-play-state: paused on the hover state: .element:hover { animation-play-state: paused; }. The animation freezes at its current frame and resumes from the same point when the cursor leaves. This works well for animated cards or images where you want to let users inspect the content without the distraction of motion.
Wrap your animation in a media query: @media (prefers-reduced-motion: no-preference) { .element { animation: myAnimation 1s ease; } }. This applies the animation only when the user has not enabled the “reduce motion” accessibility setting in their OS. Users with vestibular disorders can find strong motion animations disorienting, so respecting this setting is both an accessibility requirement and good practice.
Yes. Separate multiple animation values with commas in the animation shorthand: animation: fadeIn 1s ease, slideUp 0.8s ease-out 0.2s. Each animation name refers to a separate @keyframes rule and has its own duration, delay, and timing. Be careful about animating the same property in two animations simultaneously — the last animation in the list wins.
Related tools

More free CSS tools