Text Tools: JSON Formatter Base64 URL Encoder JSON to CSV CSV to JSON Word Counter Case Converter UUID Generator Timestamp Converter Lorem Ipsum JWT Decoder Markdown to HTML Password Generator Hash Generator Percentage Calculator Age Calculator Text Diff Checker Regex Tester BMI Calculator Color Contrast Checker Text to Speech Text Encryption Slug Generator Random Number Tip Calculator JSON to XML

Free Color Contrast Checker

Check WCAG AA/AAA contrast ratios for text and background colors | 100% Private

Color Contrast Checker

21.00:1
Contrast Ratio
Normal Text AA (4.5:1)
Normal Text AAA (7:1)
Large Text AA (3:1)
Large Text AAA (4.5:1)

Normal text preview (16px)

The quick brown fox jumps over the lazy dog.

Large text preview (24px bold)

The quick brown fox jumps over the lazy dog.

Accurate WCAG Math

Uses the official relative luminance and contrast ratio formulas from the WCAG 2.1 specification.

Color Picker + Hex Input

Pick colors visually or type exact hex codes — both stay in sync instantly.

AA & AAA Pass/Fail

Instantly see pass or fail for normal and large text at both WCAG conformance levels.

Live Preview

See exactly how your color combination looks in normal and large text sizes.

One-Click Swap

Instantly swap foreground and background colors to compare both directions.

100% Private

All calculations happen in your browser — no colors are ever sent anywhere.

The Complete Guide to WCAG Color Contrast

Low-contrast text is one of the most common accessibility failures on the web, making content difficult or impossible to read for users with low vision, color blindness, or anyone using a screen in bright light. This tool computes the exact WCAG 2.1 contrast ratio between your foreground and background colors and tells you whether it meets accessibility standards.

Why UtilityX is Different

  • ✅ Official WCAG 2.1 Formula
  • ✅ 100% Free Forever
  • ✅ Zero Server Uploads
  • ✅ AA + AAA Pass/Fail
  • ✅ Unlimited Daily Use
  • ✅ No Account Needed

How the Contrast Ratio Formula Works

Each color is first converted to relative luminance by normalizing its R, G, and B channels to 0–1 and applying a gamma-correction curve. The contrast ratio is then (L1 + 0.05) / (L2 + 0.05), where L1 is the luminance of the lighter color and L2 is the luminance of the darker color. This produces a value from 1:1 (no contrast) to 21:1 (maximum possible contrast, black on white).

Understanding AA vs AAA

WCAG AA is the widely adopted baseline standard, required by most accessibility laws and guidelines, requiring 4.5:1 for normal text and 3:1 for large text. WCAG AAA is a stricter, enhanced standard requiring 7:1 for normal text and 4.5:1 for large text, recommended for content aimed at users with more significant visual impairments.

Frequently Asked Questions

How is the contrast ratio calculated?

The tool follows the official WCAG formula: each color's sRGB channels are converted to relative luminance, then the ratio (L1 + 0.05) / (L2 + 0.05) is computed, where L1 is the lighter color's luminance and L2 is the darker one. The result ranges from 1:1 (identical colors) to 21:1 (pure black on pure white).

What contrast ratio do I need to pass WCAG?

For normal text, WCAG AA requires at least 4.5:1 and AAA requires at least 7:1. For large text (18pt+/14pt bold+), AA requires 3:1 and AAA requires 4.5:1.

What counts as "large text" under WCAG?

Large text is defined as at least 18pt (24px) regular weight, or at least 14pt (18.66px) bold. Large text has lower contrast requirements because bigger, bolder strokes remain readable at lower contrast.

Are my colors sent to a server?

No. All luminance and contrast calculations happen locally in your browser with JavaScript. Nothing about your colors is transmitted or stored anywhere.

Why does black on white give exactly 21:1?

Black has the minimum possible relative luminance (0) and white has the maximum (1). Plugging these into the WCAG formula, (1 + 0.05) / (0 + 0.05), gives exactly 21, which is the maximum contrast ratio possible between any two colors.