What Is a CSS Loader Generator?
A CSS loader generator creates animated loading indicators using pure CSS — no JavaScript, no GIFs, no external dependencies. CSS loaders are lightweight (a few bytes of CSS), hardware-accelerated, resolution-independent, and customizable with CSS variables. This tool offers 10 loader styles with control over color, size and speed.
When to Use Loading Animations
Show a loader any time the user is waiting for content: API responses, image uploads, page transitions, or lazy-loaded sections. The animation signals that the application is working, preventing users from thinking the page is broken. Keep loaders centered, visible, and branded with your accent color.
How to Use This CSS Loader Generator
- Choose a loader style — Pick one of 10: spinner, ring, pulse, chase, dots, bars, ellipsis, grid, hourglass or ripple.
- Customize colors and size — Set the loader color to match your brand and adjust the size for your use case — small for inline, large for full-page.
- Set the animation speed — Control the rotation or pulse speed. Most loaders work best between 0.8–1.5 seconds per cycle.
- Copy the CSS — The copied CSS starts with a comment showing the HTML to use, followed by the .loader rules and @keyframes. No JavaScript is needed.
Worked example: what each of the 10 loaders costs the browser
We generated all ten styles at the default settings (48 px, 1 s) on October 12, 2026 and checked two things. The first was what the copied code contains: the size in bytes, and which properties its @keyframes animate. The second was what the loader costs while running. Each one spun for 2 seconds in Chromium 141 while we counted layouts and style recalculations with the browser's performance counters.
| Loader | CSS size | Animates | Layouts / style recalcs in 2 s |
|---|---|---|---|
| Spinner | 271 B | transform | 0 / 0 |
| Ring | 276 B | transform | 0 / 0 |
| Pulse | 286 B | transform, opacity | 0 / 0 |
| Chase | 455 B | transform | 0 / 0 |
| Dots | 434 B | transform, opacity | 0 / 2 |
| Bars | 476 B | transform | 0 / 1 |
| Ellipsis | 438 B | transform, opacity | 0 / 3 |
| Grid | 772 B | transform, opacity | 0 / 5 |
| Hourglass | 375 B | transform, border-radius | 0 / 118 |
| Ripple | 375 B | width, height, opacity | 121 / 121 |
Eight of the ten run on the compositor and cost almost nothing once started. The two exceptions are worth knowing about if the loader shows while your page is busy, which is when loaders usually appear. Hourglass animates border-radius, which needs a style recalculation and repaint every frame. Ripple animates width and height, which forces a full layout every frame, about 60 a second. Both are fine for a short wait. For a long wait behind heavy JavaScript, pick one of the transform-only styles. Every style is under 800 bytes including its HTML comment, smaller than a typical GIF spinner.
Make it accessible: two additions to the copied code
The generated loader is a plain <div>, so screen readers announce nothing.
- Announce the wait. Give the loader
role="status"and visually hidden text such as "Loading…". The ARIAstatusrole is a polite live region, and it's the pattern WCAG 2.2's success criterion 4.1.3 (Status Messages) describes for this case. - Respect reduced motion. Inside
@media (prefers-reduced-motion: reduce), slow the animation down a lot or replace it with a static "Loading…" label, so the spinning stops for people who have asked their system for less motion.
When to show a loader at all follows Jakob Nielsen's classic response-time limits. Around 0.1 second feels instant and needs no feedback. Up to about 1 second the user notices the delay but keeps their flow. Beyond that, show that something is happening, and for waits approaching 10 seconds, prefer a progress indicator to an endless spinner.
Sources
Checked on .
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools