Free Online CSS Badge Generator with Contrast Checks
Generate pill and square badges, a notification dot and a count bubble positioned on a parent. Size, padding, radius, font, background, text colour and border are yours to set, and the five status presets are built from one accent colour with the contrast of each measured against WCAG AA.
| Preset | Background | Text | Ratio | WCAG AA |
|---|
The badges above are real elements with the generated stylesheet applied, shown on a white surface because that is what the ratios are measured against when a tone has no background of its own.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Build CSS Badges
A few steps, and nothing is uploaded.
What to Know About Badges
Including why colour alone is not a status.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the CSS Badge Generator
Badges look trivial until you need five of them that agree with each other. Hand-picked status colours drift apart: the green is fresh, the amber is muddy, the red is louder than everything else, and none of them look like the rest of the product. The fix is to derive them, and that is what this page does, taking the saturation and lightness of one accent colour and applying the hue that each status has come to mean.
The second half of the problem is contrast. Badge text is small, often 11 or 12 pixels, and a fill that looks bold on screen frequently fails a contrast check by a wide margin. The tool measures every preset as it is generated, shows the ratio and the verdict in a table, and names the failures above it. That check runs on the same colours the CSS writes, so there is no gap between what you were shown and what you copied.
The preview is real markup with the generated stylesheet applied, and it sits on a white surface deliberately, because an outline badge has no background of its own and its ratio has to be measured against something. The dot and the count bubble are shown on real parent elements so you can see the offsets and the ring doing their work, which is the only way to judge whether the bubble is crowding the thing it is attached to.
Frequently Asked Questions
Contrast, status colours, dots and screen readers.