See how your text looks before you put it on a page. Type or paste your own text, choose a font, and adjust the size, weight, line height, letter spacing and colors. The preview updates as you change each setting, and the tool shows the contrast ratio of your text color on your background. When the text looks right, copy the CSS in one click. Everything runs in your browser, and nothing you enter is sent to a server.
Good typography is mostly small decisions. A little more line height or a slightly larger size can make the same text far easier to read.
How to use the typography tester
- Add your text: pick a sample from the list, or type or paste your own text in the box.
- Choose a font: pick a font family, a weight, a style, an alignment and a text case.
- Adjust the spacing: use the sliders for font size, line height, letter spacing and word spacing.
- Set the colors: type a HEX code or click a swatch to choose the text and background colors.
- Check the contrast: the info bar under the preview shows the contrast ratio and whether it passes WCAG AA.
- Copy the CSS: click any row in the results to copy one value, or press Copy CSS for the full set.
- Compare fonts: click a font in the list to switch to it and see the same text right away.
What each setting does
These are the settings you can change, with a typical range for body text on the web.
| Setting | Typical range | What it does |
|---|---|---|
| Font size | 16 to 20 px | Sets how large the letters are. Body text below 16 px is harder to read. |
| Line height | 1.4 to 1.7 | Sets the space between lines. Longer lines need more of it. |
| Letter spacing | -0.02 to 0.1 em | Sets the space between letters. Add a little to small or uppercase text. |
| Word spacing | 0 to 0.1 em | Sets the space between words. Most text works best at the default. |
| Font weight | 400 to 700 | Sets how thin or thick the strokes are. Use bolder weights for headings. |
How the contrast is checked
The tester uses the same formula as WCAG 2. It compares the brightness of your text color with the brightness of your background and gives a ratio from 1:1 to 21:1. Normal text needs at least 4.5:1 to pass level AA. Large text, which means 24 px or more, or 18.66 px or more in bold, needs at least 3:1. The info bar changes color when your text does not pass.
What this tool does and does not do
The tool previews text with fonts that are already installed on most devices, such as Arial, Georgia and Courier New. It does not load fonts from the web, so Google Fonts and other custom fonts are not included. A font that is not installed on your device is replaced by the next font in its list, so the preview can look different on another computer or phone. The CSS you copy is a starting point. Test it in your real page, with your real content.
Tips for better results
- Test real text: a headline and a paragraph from your page show more than a sample sentence.
- Keep lines short: aim for about 45 to 75 characters per line, and raise the line height for longer lines.
- Use a unitless line height: a value such as 1.5 scales with the font size, so it stays right when you change the size.
- Avoid justified text on narrow screens: it can leave large gaps between words.
- Limit the weights: two or three weights are enough for most designs.
- Check contrast on both themes: if your site has a dark mode, test the text on that background too.
Pick a font, set the spacing, check the contrast and copy the CSS. A few minutes of testing here saves a lot of changes later.
Common typography problems
- The font looks the same after I change it: some fonts are not installed on every device, and the preview then falls back to a similar font. Try another font from the list.
- The weight does not change: not every font has every weight. The browser picks the nearest weight the font has.
- The HEX field will not accept my code: use three or six letters and numbers from 0 to 9 and A to F, such as #123 or #112233.
- The text is hard to read: check the contrast ratio, then raise the font size or the line height.
- My settings disappeared: the last settings are saved in your browser. Clearing site data or using a private window removes them.
Frequently asked questions
Is this typography tester free?
Yes. There is no sign-up and no limit on how much text you test.
Can I test my own text?
Yes. Type or paste your text in the box. The preview shows up to 2,000 characters.
Does it include Google Fonts?
No. The tool uses fonts that are already installed on most devices, so nothing is downloaded and the preview loads fast.
What is a good line height?
For body text, a value between 1.4 and 1.7 works well. Headings can use less, often between 1.1 and 1.3.
What is em in letter spacing?
One em is the current font size. A letter spacing of 0.05em on 20 px text adds 1 px between letters, and the space grows with the size.
What contrast ratio do I need?
WCAG AA asks for 4.5:1 for normal text and 3:1 for large text. Level AAA asks for 7:1 and 4.5:1.
Are my texts sent anywhere?
No. All calculations run in your browser, and your last settings are saved only on this device.