What is the CSS Checkbox & Radio Generator?
Style custom checkboxes and radio buttons with pure CSS. Accessible, keyboard-operable, and works in all modern browsers.
Everything runs locally in your browser. Adjust the controls above, preview instantly, and copy clean, production-ready CSS — no account, no upload.
Using the CSS Checkbox & Radio Generator
Everything lives in the panel at the top of this page. There is nothing to install — it all runs right here in your browser.
Choose checkbox or radio
Toggle between checkbox (multiple selection) and radio (single selection). The shape changes to square vs circle accordingly.
Set size and colours
Adjust the control size (14px-24px) and the checked state colour.
Copy the CSS
Click Copy. The generated CSS uses appearance: none to override browser defaults. Tested in Chrome 84+, Firefox 80+, Safari 15+.
What the generated code looks like
Clean, production-ready CSS — no vendor bloat, no unnecessary declarations.
.custom-checkbox {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
}
.custom-checkbox input[type="checkbox"] {
appearance: none;
width: 18px;
height: 18px;
border: 2px solid #ccc;
border-radius: 4px;
cursor: pointer;
transition: border-color 0.15s, background 0.15s;
flex-shrink: 0;
}
.custom-checkbox input[type="checkbox"]:checked {
background: #0071e3;
border-color: #0071e3;
background-image: url("data:image/svg+xml,...");
background-repeat: no-repeat;
background-position: center;
}
.custom-checkbox input[type="checkbox"]:focus-visible {
outline: 2px solid #0071e3;
outline-offset: 2px;
}appearance: none removes the browser default checkbox rendering. The :checked state uses an SVG data URI for the checkmark. This is the modern approach supported in all browsers since Chrome 84, Firefox 80, Safari 15.
Common mistakes & how to fix them
A few habits trip people up. Here is what to watch for — and the exact fix.
Using appearance:none without a fallback
In very old browsers (IE11), appearance: none may not work, leaving unstyled inputs.
Fix: Wrap custom styles in @supports (appearance: none) if IE11 support is required. For modern browsers, appearance: none has near-universal support.
Pro tips for better results
Use the :indeterminate state for multi-select "select all" patterns
Checkboxes have a third state: indeterminate. Set it with JS: el.indeterminate = true. Style it with input:indeterminate for a dash indicator in parent checkboxes.
Frequently asked questions
From the blog
Read more →Modern CSS techniques every developer should know
A practical tour of the CSS features that replaced yesterday’s hacks.
From design to code without the friction
How visual generators speed up the build without sacrificing clean output.
Writing CSS that scales with your project
Tokens, naming, and structure that keep large stylesheets maintainable.