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 →CSS Box Shadow: A Complete Guide with Examples (2026)
Master CSS box-shadow: every value explained, layering multiple shadows for realistic depth, inset shadows, the spread trick, and copy-paste examples for cards, buttons, and more.
CSS Animations: A Practical Guide to Keyframes and Transitions (2026)
Learn the difference between transitions and keyframe animations, how to write @keyframes, the properties worth animating for 60fps, and easing that actually looks good.
CSS clamp() and Fluid Typography: Stop Writing Font-Size Media Queries (2026)
Learn how CSS clamp() creates type that scales smoothly between screen sizes with a single line, the formula behind it, and how to build a fully fluid type scale without media queries.