CSS

CSS Loader Generator

Details

How to use CSS Loader Generator

What the tool does, how to run it, and what to expect from the result.

How to generate a pure-CSS loading spinner

Pick one of the five styles and set the color, size, and speed. The preview runs the exact CSS the tool is about to hand you, including the staggered delays that make the dots and bars ripple.

The copy button gives you HTML and CSS together. The markup is a div (with three or four child spans for the dots and bars styles) and the CSS is scoped to a .loader class.

  • Choose a style: ring, bouncing dots, bars, dual ring, or pulse.
  • Set the color with the swatch, then the size (16 to 96px) and the speed (0.3s to 3s).
  • Watch the preview until the rhythm looks right.
  • Press Copy result to take the HTML and the <style> block.
  • Paste it into your page, rename the .loader class if one already exists, and add role="status" with hidden loading text.
Tips

Getting a better result out of CSS Loader Generator

Specific settings and thresholds, not general advice.

  • All five loaders are pure CSS, so the whole snippet is a few hundred bytes of markup and style. A spinner GIF at the same visual size is usually 5 to 20 KB and an SVG animation library is far more, which matters when the loader is the thing shown while the rest of the page is still downloading.
  • The size slider spans 16px to 96px. Below about 24px the ring border, which is computed as size/8, drops to its 3px minimum and the ring stops reading as a circle.
  • Speed runs from 0.3s to 3s per cycle. Under roughly 0.6s a ring reads as frantic; 0.8s to 1.2s is the range most interface spinners sit in.
  • The dots and bars loaders stagger their children with animation-delay derived from the speed (speed/6 and speed/3 for dots, speed/8, speed/4 and 3*speed/8 for bars). If you change the speed by hand later, change those delays too or the wave falls out of step.
  • The copied CSS uses the class name .loader. Paste two different loaders into the same page and the second definition wins, so rename the class if you need both.
Limits

What CSS Loader Generator does not do

The honest boundary, so you do not lose time finding it yourself.

  • Five styles only: ring, bouncing dots, bars, dual ring, pulse.
  • One color per loader. There is no gradient or two-tone option.
  • No prefers-reduced-motion fallback is emitted, and a permanently spinning element is exactly what that setting exists to suppress.
  • No accessibility markup. The snippet is a bare div, with no role="status" and no visually hidden loading text.
At a glance

Who CSS Loader Generator is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Front-end developers building loading spinners.

Ideal for

Using the css loader generator without installing anything or signing up.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Why is a CSS spinner better than an animated GIF?

It is a few hundred bytes instead of several kilobytes, it scales to any size without going blurry, it inherits your brand color from one hex value, and it renders on the compositor rather than decoding image frames. It also has no extra network request, which matters because a loader is shown precisely when the network is the bottleneck.

How do I make the spinner accessible?

Wrap it in an element with role="status" and put visually hidden text like "Loading" inside, so a screen reader announces the wait instead of nothing. The generator does not add that markup for you.

Should I hide the loader for users who prefer reduced motion?

Yes, or at least tame it. Wrap the animation in a @media (prefers-reduced-motion: reduce) block that sets animation: none and shows a static indicator instead. An infinite spin is the classic trigger for motion sensitivity.

The bouncing dots look out of sync after I edited the CSS. What happened?

The dots and bars loaders rely on hardcoded animation-delay values that were computed from the speed you chose. Change the animation duration and the delays no longer land at the right fraction of the cycle. Regenerate at the new speed instead of hand-editing the duration.

Can I center the loader on the page?

The snippet only styles the loader itself. Put it in a flex container with align-items: center and justify-content: center, or use position: fixed with inset: 0 for a full-screen overlay. The dots and bars loaders are inline-flex, so they sit on the text baseline unless you wrap them.

Which loader style is the safest default?

The ring. It is a single element, it reads as a spinner at any size from 24px up, and it has the lowest risk of looking broken if your CSS is later overridden. Dots and bars need three or four child spans, and the pulse relies on opacity animating to 0, which some people read as the element disappearing rather than loading.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon