CSS Loader Generator

Make a loading spinner, bouncing dots, stretching bars or a pulse with pure CSS, choosing colour, size and speed, with accessible markup.

Processed on your device. Files are not uploaded

How to make a CSS loading spinner

  1. Pick a style

    Spinner, bouncing dots, bars or a pulse.

  2. Set colour and size

    The preview animates as you change them.

  3. Set the speed

    Choose how fast it animates.

  4. Copy the code

    Copy the HTML and CSS blocks into your page.

Worked example

This is what CSS Loader Generator gives for its own sample values. Open the tool above and change anything to try your own.

Style
Spinner ring
Colour
#0f766e
Size (px)
56
One cycle takes (seconds)
1

HTML

<div class="loader" role="status" aria-label="Loading"></div>

CSS

.loader {
  width: 56px;
  height: 56px;
  border: 7px solid #0f766e33;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .loader, .loader span { animation-duration: 4s; }
}

About CSS Loader Generator

Make a loading indicator with pure CSS and a little HTML, with no image or script. It is marked as a status for screen readers and slows down for people who prefer reduced motion.

FAQs

Do I need JavaScript?

No. Add the HTML where the loader should appear and remove it when your content is ready.

Will it slow my page?

No. Only transform and opacity change, which browsers animate smoothly.

Is it accessible?

It has role=status and an aria-label, and the animation slows when the device asks for reduced motion.

Related tools