CSS Loading Spinner Generator

Generate a lightweight, pure-CSS loading spinner. Pick a ring, dual ring, bouncing dots, bars or pulse, set the size, thickness, color and speed, and copy HTML and CSS with no images, no SVG and no JavaScript. The markup includes a screen-reader label and respects reduced-motion settings. It's free, runs in your browser, and nothing leaves your device.

Spinner styles

StyleElementsBest for
Ring1General loading
Dual ring1Compact, more visible motion
Dots3Inline, chat 'typing' feel
Bars4Audio or data apps
Pulse1Subtle background activity

When to use it

  1. Show progress while a form submits.
  2. Add a placeholder while data loads into a table or chart.
  3. Replace a heavy GIF or Lottie loader with a few lines of CSS.
  4. Make a branded loader for a single-page app's first load.

How to Use

  1. Pick a spinner style.
  2. Set size, thickness, colors and duration.
  3. Set a class name if you need more than one.
  4. Copy the HTML and CSS.

Features

  1. Ring, dual ring, dots, bars and pulse
  2. No images or JavaScript
  3. role="status" with screen-reader text
  4. Reduced-motion support
  5. Name-spaced keyframes
  6. 100% client-side

FAQs

Do I need JavaScript for this spinner?

No. It's HTML and CSS only. Use JavaScript just to show and hide it.

Is it accessible?

It has role="status" and hidden “Loading…” text so screen readers announce it, and it slows down for users who prefer reduced motion.

Can I have several spinners on one page?

Yes. Animation names include the class name, so different spinners don't clash.

Why transform and opacity?

Browsers can animate them without repainting the page, which keeps the spinner smooth even while JavaScript is busy.

Is anything uploaded?

No. The code is generated in your browser.

Technical Details

Each spinner is a single element, with child spans where the style needs them, animated by @keyframes using only transform and opacity, which browsers can run on the compositor without repainting. The ring is a circle with one colored border segment over a track color, rotated continuously; the dual ring colors two opposite segments; dots and bars use staggered negative animation delays so they start mid-cycle rather than all together; pulse scales a circle up while fading it out. Keyframe names are prefixed with the class name so several spinners can live on one page. For accessibility the wrapper has role="status" and contains visually hidden “Loading…” text, so screen readers announce it. Under prefers-reduced-motion the animation is slowed to a quarter speed rather than removed, because a frozen spinner looks like a broken page.

Web & CSS Tools

Web & CSS Tools

  • CSS Toggle Switch Generator
  • CSS Checkbox Generator
  • CSS Background Pattern Generator
  • CSS Scrollbar Generator
  • CSS Triangle Generator
  • CSS Text Glitch Generator
  • React Native Shadow Generator
  • CSS Specificity Calculator