Free Online Contrast Checker (WCAG)
Evaluate foreground and background color contrast ratios for WCAG AA and AAA accessibility compliance across normal and large text.
Normal text
Large text (18pt / 14pt bold)
The quick brown fox jumps over the lazy dog.
Contrast ratio
17.40:1
How to Check Color Contrast
Enter your two colors.
Pick the text color and the background color, or type a 6-digit hex code such as #1a1a1a in each box.
Read the ratio and checks.
The contrast ratio updates as you type, and five rows show pass or fail for AA and AAA text and for UI parts.
Adjust and copy.
Darken or lighten a color until the rows you need pass, try Swap for the reverse pair, then copy the ratio for your notes.
Frequently Asked Questions
Answers about WCAG ratios, large text, rounding and what this checker can read.
What contrast ratio does WCAG AA require?
WCAG AA needs at least 4.5:1 for normal text and 3:1 for large text. Icons, input borders and other UI parts need 3:1 against the colors next to them. AAA raises the text rules to 7:1 for normal and 4.5:1 for large text.
How is the contrast ratio calculated?
Each color's red, green and blue values are converted to linear light and weighted into a relative luminance. The ratio is the lighter luminance plus 0.05, divided by the darker plus 0.05, so it runs from 1:1 for the same color to 21:1 for black on white.
What counts as large text in WCAG?
Large text is at least 18pt (24px) regular or 14pt (about 18.66px) bold. It only needs 3:1 for AA and 4.5:1 for AAA. The checker doesn't ask for a font size, so read the large-text rows only if your text is that big.
Is WCAG AA enough, or do I need AAA?
AA is the level most laws and policies point to, including EN 301 549 in the EU and the 2024 US rule for state and local government websites, which both use WCAG 2.1 AA. AAA is stricter and a good target for long reading text.
What does the UI components check mean?
It tests the 3:1 rule for non-text parts, WCAG success criterion 1.4.11. Use it for icon colors, input borders, focus rings and chart lines. Put the part's color in the text color box and the color behind it in the background box.
Why does it show 3.00:1 but fail?
The ratio on screen is rounded to two decimals, but the checks use the exact value, as WCAG requires. Gray #959595 on white is 2.995:1, so it shows 3.00:1 and still fails the 3:1 rows. Darken the color a little to pass.
Why does the checker show 0.00:1?
It reads 6-digit hex codes only, with or without the #. Short codes like #fff, 8-digit codes with transparency, rgb(), hsl() and color names give 0.00:1 and fail every row. Write #fff as #ffffff. A wrong letter, as in #12345g, is read as a different color with no warning.
What is the highest possible contrast ratio?
21:1, which is pure black #000000 on pure white #ffffff. Two identical colors give 1:1, the lowest. The default pair here, #1a1a1a on white, scores 17.40:1, and mid-gray #767676 on white is 4.54:1, just above the 4.5:1 AA line.
Can I check text on a gradient or photo?
Not directly, since it compares one solid color with another. For text on a gradient or image, find the spot behind the text that is closest in lightness to the text color. Enter that color as the background and check it.
Does it support APCA or WCAG 3?
No. It uses the WCAG 2.x contrast ratio, which WCAG 2.1, WCAG 2.2 and current laws rely on. APCA is a draft method for the future WCAG 3 that scores text by size and weight, and this tool doesn't calculate it.
Is this contrast checker free and private?
Yes. It's free, with no account and no limit on checks. The colors you enter stay in your browser and are not saved. On the live site, Google Analytics counts Copy ratio clicks, never the colors or the ratio.
Contrast Checker for WCAG Text and UI Colors
Two hex colors in, one contrast ratio out, with five WCAG checks, a live preview, a swap button and a ratio you can copy.

Check Contrast Against WCAG AA and AAA
Pick a text color and a background color to get the contrast ratio. Five rows then show pass or fail for AA and AAA text sizes and the 3:1 rule for UI parts.
- AA normal text needs 4.5:1
- AAA normal text needs 7:1
- Large text and UI parts need 3:1

Preview Text on Your Background Color
The preview box fills with your background and shows sample text in your text color at three sizes. The ratio and every pass or fail row update as you change either color.
- Sample text at three sizes
- Updates on every color change
- Ratio shown to two decimals
Swap Text and Background
One click on Swap colors flips the two colors, so you can test light text on a dark background and the reverse. The ratio stays the same, but the preview changes.
Copy the Contrast Ratio
Copy ratio puts the ratio on your clipboard to two decimals, such as 4.54:1, ready for a design spec, audit report or ticket. The pass or fail rows use the unrounded value, as WCAG asks.
Type or Pick Hex Codes
Each color has a picker and a text box. Type a 6-digit hex code such as #767676, with or without the #. Short codes like #fff and rgb() values are not read.
Free, With No Sign-Up
Use it as often as you like, with no account. The colors you enter stay in your browser. On the live site, Google Analytics counts Copy ratio clicks, never the colors.
When to Check Color Contrast
Check contrast early, while a color is still easy to change.
Design Review
Check color choices in your design files before handoff. Copy each hex code from your design tool, paste it here and fix any pair that fails AA.
- Primary buttons with a white label on your brand color
- Body text on tinted or brand-colored backgrounds
- Placeholder and helper text, which is often too light
Accessibility Audit
Audit an existing site or app against WCAG 2.1 AA. Test each text and background pair, note the ratio and record which of the five checks it fails.
- Find pairs that fail the 4.5:1 rule for body text
- Copy each ratio into your audit notes or ticket
- Check icon and input border colors at 3:1
Design System
Test the color tokens in your palette before you publish them. Check each text token on each surface color, then mark which pairs are safe for body text.
- Test every text token on every surface color
- Use Swap to check light and dark theme pairs
- List the pairs that pass AA for your documentation
Explore More Tools
Discover other free tools that work great alongside this one
CSS Gradient Generator
Build custom CSS gradients visually
Box Shadow Generator
Design CSS box-shadows with live preview
Color Converter
Convert HEX, RGB and HSL color codes as you type
Color Palette Extractor
Pull the main colors from an image as HEX, RGB or HSL
JSON Formatter
Format, validate and minify JSON in your browser
Regex Tester
Test and debug regular expressions live