CSS Scrollbar Generator
Style scrollbars for Chrome, Edge, Safari and Firefox, with a live preview.
Enter your values
Space around the thumb, shown in the track colour
Result
CSS
/* Chrome, Edge, Safari */
.scroll::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.scroll::-webkit-scrollbar-track {
background: #F1F5F9;
}
.scroll::-webkit-scrollbar-thumb {
background: #6366F1;
border-radius: 8px;
border: 2px solid #F1F5F9;
}
.scroll::-webkit-scrollbar-thumb:hover {
background: #4F46E5;
}
/* Firefox */
.scroll {
scrollbar-width: auto;
scrollbar-color: #6366F1 #F1F5F9;
}- Tip
- Replace .scroll with html to style the whole page's scrollbar.
WebKit browsers use the ::-webkit-scrollbar pseudo-elements; Firefox only supports scrollbar-width and scrollbar-color, so both are included.
Live preview
How to use CSS Scrollbar Generator
- Enter width, track colour and thumb colour.
- The result updates instantly as you type, with no button to press.
- Read the formula box to see how it was calculated, then copy the result.
Features
- Instant results
- Results update as you type, with no Calculate button and no page reload.
- Formula explained
- See exactly how the answer is worked out, so you can check it or learn the method.
- Private & free
- Everything runs in your browser. Nothing you enter is uploaded or stored.
Frequently asked questions
How does the CSS Scrollbar Generator work?
It uses this method: WebKit browsers use the ::-webkit-scrollbar pseudo-elements; Firefox only supports scrollbar-width and scrollbar-color, so both are included.
Is this CSS Scrollbar Generator free?
Yes. It is 100% free, needs no sign-up and works on mobile and desktop. Your numbers never leave your device.
Free, no sign-up. Your files and numbers are processed in your browser and are not uploaded.