UTILS.
Private by default
◜

CSS Spinner Generator

Generate a pure-CSS loading spinner and copy the CSS.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

CSS Loader Generator creates a loading spinner in pure CSS. Choose a style (ring, dots or bars), set the colour, the size from 16 to 120 pixels and the animation duration from 0.3 to 3 seconds, and the preview animates live while the code updates.

The copied output is the @keyframes rule plus the class CSS: uw-spin for the ring, uw-bounce for the three dots and uw-stretch for the four bars. The markup is not part of the copied text, so you add it yourself: a single div with class uw-ring, a div with class uw-dots holding three spans, or a div with class uw-bars holding four spans. The ring is a bordered circle with a faint track (the colour at about 20 percent opacity) and a solid top edge that rotates. Border thickness, dot size and bar width scale with the size you choose, with sensible minimums.

There is no JavaScript and no image, so the loader works wherever the CSS does. The generated code does not include a prefers-reduced-motion rule, so add one if you want to respect that setting. Colours are output as hex codes. All code is generated in your browser.

Frequently asked questions

Does the spinner need any images or JavaScript?
No. It is only CSS: a keyframes animation and a few rules. You add a small amount of HTML, a div with the matching class and, for dots and bars, the span children.
How do I change how fast it spins?
Use the speed slider, from 0.3 to 3 seconds per cycle. The value is written into the animation duration in the CSS, so you can also edit it by hand later.
Which class names and markup do I need?
Ring: a div with class uw-ring. Dots: div class uw-dots with three spans. Bars: div class uw-bars with four spans. Only the CSS is copied, not the HTML.
Should I respect reduced motion?
Yes where possible. The generated CSS has no prefers-reduced-motion rule, so wrap the animation in one or pause it for users who ask for less motion.

More tools