01What is CSS Animation Keyframes?
Writing @keyframes by hand is easy to get slightly wrong, and you only find out when the element twitches. This builder gives you a live preview while you edit, then hands you a @keyframes block, a longhand rule and a one-line shorthand ready to paste. Start from one of six presets: bounce, fade-in-up, pulse, slide-in-left, shake or spin. Each keyframe row has an offset from 0 to 100 percent and a text field for every property already in that frame. Change an offset and the rows re-sort themselves. The x button removes a stop, and + Add inserts one ten percent after the last stop, or at 50% if you are already at 100. New stops start with transform: translateX(0). You can edit values but not add new property names, so pick the preset closest to what you want. The controls above cover Name, Duration, Timing, Iterations, Direction and Fill. Duration is free text and must be a valid CSS time like 0.6s, .5s or 400ms. Timing offers ease, ease-in, ease-out, ease-in-out and linear. Iterations can be infinite, 1, 2 or 3. The name gets cleaned up for you. Per the CSS Animations spec, an animation name is a custom identifier. It cannot contain spaces, start with a digit or be a keyword like none. So fade in up becomes fade-in-up, 3d-flip becomes anim-3d-flip, and none becomes anim-none. Keywords such as ease-in or infinite also get the prefix, because the shorthand would read them as timing or iteration values. Here is what that looks like. Set the name to pulse, duration 2s, timing ease-in-out, iterations infinite and direction alternate. The shorthand comes out as animation: 2s ease-in-out infinite alternate pulse. Direction and fill only show up when they differ from normal and none. The preview uses the browser's Web Animations API on a small sample box. It applies your timing function to each segment between stops, which matches how CSS treats animation-timing-function. No stylesheet is injected into the page. If the duration is not a valid time, the preview pauses and tells you why. Some limits to keep in mind. There is no cubic-bezier or steps() option in the Timing menu, and no animation-delay field. Add those to the copied CSS by hand. The tool also doesn't check property values, so a typo like translateY(20) without a unit will be copied as is. Your keyframes never leave the tab.
Frontend developers, UI designers and students who want working CSS animations without writing keyframes from scratch. The tool runs entirely in your browser, so your data never leaves your device.
02How to use CSS Animation Keyframes
- Pick a Preset, or load one of the examples, to seed the keyframes.
- Set Name, Duration, Timing, Iterations, Direction and Fill.
- Edit offsets and values in the Keyframes list, using + Add or x to change the number of stops.
- Watch the preview box, then click Copy CSS or take the Shorthand line.
03Worked examples
- Input:
Name "fade in up", Duration 0.4s, Timing ease-out, Iterations 1, Fill forwards - Result:
animation: 0.4s ease-out 1 forwards fade-in-up; - Spaces in the name become hyphens.
- Input:
Name "pulse", Duration 2s, Timing ease-in-out, Iterations infinite, Direction alternate - Result:
animation: 2s ease-in-out infinite alternate pulse; - Fill is none, so it is left out.
- Input:
Name "none", Duration 1s, Timing linear, Iterations infinite - Result:
animation: 1s linear infinite anim-none; - none is a reserved keyword, so it gets the anim- prefix.
- Input:
Name "3d-flip" - Result:
@keyframes anim-3d-flip { ... } - Names can't start with a digit. Trimmed to the first line.
- Input:
Preset spin, Name "spin", Duration 1s, Timing linear - Result:
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } - The keyframes block for the spin preset. Iterations stays infinite by default.
- Input:
Duration "1 s" - Result:
Preview paused: duration must look like 0.6s or 400ms. - A space between number and unit isn't a valid CSS time.
04Common use cases
- Building a loading spinner for a submit button from the spin preset
- Adding a fade-in-up entrance to cards as they appear on a landing page
- Shaking an invalid form field once with iterations set to 1
- Tuning a pulse on a notification badge before copying it into a Tailwind config
- Checking how alternate direction changes a bounce before shipping it
- Showing students how offsets, iteration count and fill mode interact
05Tips
- Animate transform and opacity where you can. Browsers can run them without recalculating layout.
- Set Fill to forwards on one-shot entrances so the element doesn't snap back to its first frame.
- Two stops with the same offset will both be kept. The later one wins, so delete duplicates.
- Wrap decorative motion in @media (prefers-reduced-motion: reduce) and turn it off there.
06Related concepts
@keyframes, animation-timing-function, animation-fill-mode, CSS transforms, prefers-reduced-motion.
Frequently Asked Questions
What is CSS Animation Keyframes?
CSS Animation Keyframes is a free, browser-based developer tool on AIDToolStack. Generate CSS @keyframes animations It requires no installation or sign-up and works entirely in your browser.
Is CSS Animation Keyframes free to use?
Yes. No sign-up, no fees and no usage cap.
Does CSS Animation Keyframes store my data?
No. It runs in your browser; nothing is uploaded.