CSS Scrollbar Generator

Create custom scrollbars with CSS that work in Chrome, Edge, Firefox and Safari. Set the width, track color, thumb color and hover color, round the thumb and inset it from the edge, and try it in a live scrollable box. The output includes both the standard scrollbar-color rules and the ::-webkit-scrollbar rules Safari needs, scoped to any selector. It's free and runs in your browser — nothing leaves your device.

Browser support

BrowserUses
Firefoxscrollbar-width, scrollbar-color
Chrome / Edge 121+scrollbar-width, scrollbar-color (WebKit rules as fallback)
Safari::-webkit-scrollbar pseudo-elements

When to use it

  1. Match a sidebar or chat panel's scrollbar to your brand.
  2. Make a thin, unobtrusive scrollbar for a code block.
  3. Give a dark theme a scrollbar that isn't bright white.
  4. Style a single widget without changing the whole page.

How to Use

  1. Set the width, radius and thumb inset.
  2. Pick the track, thumb and hover colors.
  3. Enter a selector, or * for the whole page.
  4. Scroll the preview, then copy the CSS.

Features

  1. Standard and WebKit properties together
  2. Hover color
  3. Rounded, inset thumb
  4. Any selector
  5. Live scrollable preview
  6. 100% client-side

FAQs

Why are there two sets of rules?

Firefox and modern Chrome/Edge use scrollbar-width and scrollbar-color. Safari only understands ::-webkit-scrollbar. Including both covers every current browser.

Can I set an exact scrollbar width in Firefox?

No. The standard property only allows auto, thin or none, so widths up to 10px are written as thin.

Should I hide scrollbars?

Rarely. Hidden scrollbars make it hard to see that content scrolls, especially for mouse users. Thin is usually better.

Why doesn't my Mac show the custom scrollbar?

macOS overlay scrollbars only appear while scrolling. Set System Settings to always show scroll bars to check it.

Is anything uploaded?

No. Everything is generated in your browser.

Technical Details

Scrollbar styling has two separate mechanisms, and real coverage needs both. The standard properties, scrollbar-width (auto, thin or none) and scrollbar-color (thumb then track), are supported by Firefox and by Chrome and Edge from version 121. Safari, and Chromium before that, use the non-standard ::-webkit-scrollbar pseudo-elements, which allow exact widths, rounded thumbs, an inset border and hover colors. The generator writes the standard rule first and the WebKit rules after, scoped to a selector you choose, so a single widget can be styled without touching the page scrollbar. The standard properties can't express a pixel width, so widths of 10px or less map to thin. The thumb inset is drawn as a border in the track color, which is how a floating, padded thumb is made. On macOS with overlay scrollbars, the system hides scrollbars until scrolling regardless of CSS.

Web & CSS Tools

Web & CSS Tools

  • CSS Triangle Generator
  • CSS Text Glitch Generator
  • React Native Shadow Generator
  • CSS Specificity Calculator
  • CSS Color & Property Extractor
  • Responsive Breakpoint Cheatsheet
  • Google Fonts Pair Finder
  • CSS Clamp Generator