CSS Checkbox Generator

Generate a custom-styled checkbox with CSS that stays fully accessible. Choose a tick, cross or filled mark, set the size, radius, border width and colors, and adjust the check animation. The output keeps the real checkbox in the page, so keyboard focus, form submission and screen readers keep working. It's free, runs in your browser, and nothing is uploaded.

Styling options compared

ApproachCustom shapeAccessible
accent-colorNo (color only)Yes
appearance: none on the inputYesYes
Hidden input + styled span (this tool)YesYes
display: none + divYesNo

When to use it

  1. Match form checkboxes to your brand color.
  2. Make larger, easier-to-tap checkboxes for mobile forms.
  3. Build a to-do list with a satisfying check animation.
  4. Replace an inaccessible display:none checkbox hack.

How to Use

  1. Choose tick, cross or fill.
  2. Set size, radius, border and animation.
  3. Pick the border, checked and mark colors.
  4. Test it with Tab and Space, then copy the HTML and CSS.

Features

  1. Tick, cross and fill marks
  2. Real input kept for accessibility
  3. Focus ring and disabled state
  4. Check animation with reduced-motion support
  5. Custom class name
  6. 100% client-side

FAQs

Why not hide the input with display: none?

That removes it from the keyboard and screen readers. The generated CSS hides it visually but keeps it usable.

Can I use accent-color instead?

accent-color tints the native checkbox in one line and is great when you only need a color change. Use this tool when you need a different size, shape or mark.

Does the label toggle the checkbox?

Yes. The whole thing is a label element, so clicking the text works.

Does it support the indeterminate state?

Not in this version. Add an input:indeterminate + span rule if you need it.

Is anything uploaded?

No. The code is generated in your browser.

Technical Details

Custom checkboxes break accessibility when the real input is removed with display: none, because it then can't be focused, toggled with Space or read by a screen reader. This generator keeps the input in the page, positioned absolutely at one pixel and fully transparent, and draws the visible box as a span that follows it, so input:checked + span and input:focus-visible + span drive every visual state. The mark is a ::after pseudo-element: a tick made from two borders of a rotated rectangle, a cross character, or a filled inner square, each scaled from zero when checked so it can animate. Sizes for the mark and its stroke are derived from the box size. A focus ring appears for keyboard users only, disabled boxes are dimmed, and a reduced-motion block turns the animation off. Wrapping everything in a label makes the text clickable too.

Web & CSS Tools

Web & CSS Tools

  • CSS Background Pattern Generator
  • CSS Scrollbar Generator
  • CSS Triangle Generator
  • CSS Text Glitch Generator
  • React Native Shadow Generator
  • CSS Specificity Calculator
  • CSS Color & Property Extractor
  • Responsive Breakpoint Cheatsheet