CSS Loader & Spinner Generator

Pick from 10 pure-CSS loading animations — ring, dots, bars, pulse, ripple and more — then customise the color, size, and speed. Preview live on light or dark backgrounds and copy ready-to-paste HTML and CSS. No images, no JavaScript.

Choose a Loader

Customise

#6366f1
#cbd5e1
48px
1s
5px

HTML

CSS

Pure-CSS Loading Spinners: A Complete Guide

A loading indicator reassures users that something is happening while content, images, or data are on the way. The best loaders are lightweight, accessible, and match your brand — and you don't need a GIF, an SVG file, or a JavaScript library to build one. Modern CSS animations can produce smooth, potentially compositor-friendly spinners from a single element.

Why CSS Loaders Beat GIFs and JavaScript

How the Common Patterns Work

Make Your Loader Accessible

A spinner is decorative, so hide it from assistive tech with aria-hidden="true" and announce status separately using a live region — for example a visually-hidden element with role="status" containing the text "Loading…". This way screen-reader users hear meaningful feedback instead of a silent animation. Also honour prefers-reduced-motion: wrap the animation in a media query so users who get motion sickness see a static or gentler indicator.

Performance Tips

Stick to animating transform and opacity — both often avoid layout and paint during animation, but compositing and performance depend on the browser and surrounding content. Avoid animating width, height, top, or margin, which force reflow every frame. Keep loaders small and remove them from the DOM once content arrives so their animation loop stops consuming resources.

Frequently Asked Questions

No. Every loader here is pure HTML and CSS using @keyframes animations. Paste the markup and styles into your project and the spinner runs on its own — no scripts, no libraries, no image files.
Use the Color and Track pickers above and the CSS updates instantly. In your own code, the colour lives in one or two properties, so you can also drive it from a CSS custom property to match light and dark themes.
They can be. Mark the spinner aria-hidden="true" and announce loading status with a separate role="status" live region containing text like "Loading…". Also respect prefers-reduced-motion for users sensitive to animation.
Performance depends on the template and browser. Transform and opacity animations are often cheaper, but the ripple template animates dimensions and position, and the progress template animates left; these can cause layout or paint work. Profile the chosen loader rather than assuming every template is compositor-only. Just remember to remove the loader from the page once your content has loaded.
Yes. The generated CSS is yours to use in personal and commercial projects with no attribution required. Everything is generated locally in your browser.