Generateur d'animations SVG

Generez des graphiques SVG animes — spinners, loaders, formes, vagues et plus. Personnalisez couleurs, vitesse et taille, puis copiez ou telechargez.

#a855f7
#6366f1
SVG
<svg width="64" height="64" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
  <circle cx="25" cy="25" r="20" fill="none" stroke="#6366f1" stroke-width="3" opacity="0.2"/>
  <circle cx="25" cy="25" r="20" fill="none" stroke="#a855f7" stroke-width="3" stroke-linecap="round" stroke-dasharray="80, 200" stroke-dashoffset="0">
    <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1.5s" repeatCount="indefinite"/>
  </circle>
</svg>
Usage
<!-- Inline -->
<div dangerouslySetInnerHTML={{ __html: `<svg width="64" height="64" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">...` }} />

<!-- As image -->
<img src="data:image/svg+xml,%3Csvg%20width%3D%2264%22%20height%3D%2264%22%20vi..." alt="animated svg" />

<!-- As file -->
<img src="/spinner-ring.svg" alt="animated svg" />

The SVG Animation Generator builds ready-to-use animated vector graphics — loading spinners, progress rings, pulsing shapes, and flowing waves — that you configure with live controls and export as clean, self-contained code. Because the output is SVG driven by CSS (and in some cases SMIL), the result stays razor-sharp at any resolution and weighs a fraction of an equivalent GIF or Lottie file.

Most of what you see here is powered by a handful of CSS primitives applied to SVG elements: @keyframes definitions animating transform: rotate() for spinners, stroke-dasharray paired with stroke-dashoffset for drawing and looping loaders, and translate/scale for waves and bouncing dots. The animation-duration and animation-timing-function properties (linear for continuous spinners, ease-in-out for organic motion) control how the loop feels. Setting transform-origin: center and transform-box: fill-box is the quiet detail that keeps rotations pivoting around the shape instead of the SVG viewport's top-left corner.

The point of an animated SVG loader over a static image is that it is inspectable, restylable, and scriptable. You can recolor it with a single fill or stroke value, retarget its speed by editing one number, and drop it inline so it inherits currentColor from surrounding text. This tool front-loads that work so you get a correct, cross-browser CSS SVG spinner without hand-writing the keyframes.

Building your animation

  1. 1

    Pick a base type — spinner, loader, shape, or wave — to load a starting template with sensible keyframes already wired up.

  2. 2

    Set the colors: choose a stroke or fill value (hex, rgb, or leave it on currentColor so it inherits from the parent text color).

  3. 3

    Tune the speed by adjusting the animation duration, and set the size in pixels; the preview updates live so you can judge the loop rhythm before exporting.

  4. 4

    Copy the generated markup straight into your HTML, or download the .svg file if you want to reference it as an external asset or optimize it further.

  5. 5

    Paste it inline where you need it and verify it inherits the surrounding font size and color, then adjust the duration one more time if the motion feels too fast or too sluggish in context.

Where these get used

  • Loading and async states

    Show a lightweight spinner while fetching data, submitting a form, or waiting on a route transition — no image request, no layout jank, and it scales crisply on high-DPI screens.

  • Skeleton and progress indicators

    Use a stroke-dashoffset ring or a shimmering wave as a determinate or indeterminate progress cue that recolors instantly to match your brand or dark mode.

  • Decorative motion and hero backgrounds

    Drop an animated wave or morphing shape behind a heading or CTA for subtle life that stays under a few kilobytes and never blocks rendering.

  • Email-safe and embeddable icons

    Export a small self-contained SVG for docs, README badges, or design mockups where you want motion without shipping a heavy Lottie runtime or GIF.

Practical notes and gotchas

  • Always set transform-box: fill-box and transform-origin: center on rotating elements. Without them, browsers rotate around the SVG's coordinate origin (0,0), sending your spinner off-screen instead of turning in place.
  • Respect prefers-reduced-motion: wrap the animation in @media (prefers-reduced-motion: no-preference) or provide a still fallback so users with vestibular sensitivity aren't forced to watch a perpetual loop.
  • Prefer animating transform and opacity over stroke-width, x/y, or width. Transform and opacity are GPU-composited and won't trigger layout or paint on every frame, which keeps the animation smooth on low-end devices.
  • Keep spinner durations in the 0.8s–1.5s range with a linear timing function. Faster than ~0.6s reads as frantic; ease-in-out on a full rotation makes it visibly stutter at the loop seam.
  • For stroke-dasharray loops, the dash and gap values must relate to the path length (2πr for a circle). Mismatched values cause a visible jump where the dash pattern resets mid-loop.

Common questions

Should I use CSS animations or SMIL for animated SVG?+

Use CSS @keyframes for most cases — it has broad support, integrates with media queries like prefers-reduced-motion, and is easy to restyle. SMIL (<animate>, <animateTransform>) is handy for self-contained SVG files used as images, but it's less flexible and cannot be triggered by external CSS state.

Why isn't my SVG spinner rotating around its center?+

By default, transform-origin refers to the SVG user-space origin, not the element's bounding box. Add transform-box: fill-box; transform-origin: center; to the animated element so the rotation pivots around the shape itself.

How do I make an animated SVG loader inherit my text color?+

Set the SVG's stroke or fill to currentColor and place it inline in your HTML. It will then adopt the CSS color value of its parent element, so a single color property recolors the loader and any adjacent text together.

Are animated SVGs better than GIFs or Lottie for loaders?+

For simple spinners and shapes, yes. SVGs are typically far smaller than GIFs, stay sharp at any size, require no JavaScript runtime like Lottie, and can be recolored and re-timed with CSS after the fact.

Do animated SVGs work in email?+

Partially. Many email clients strip or ignore CSS animations and SMIL, so animated SVGs often render as a static first frame. Design the initial state to look acceptable on its own, and don't rely on motion to convey meaning in email.

Why does my stroke-dasharray animation jump or flicker at the loop point?+

This happens when the dasharray/dashoffset values don't align with the path's total length. For a circle, base your dash and offset on the circumference (2 times pi times the radius) so the pattern returns to its starting position seamlessly.