Start a project

Tool 94 of 194 · Performance

Font Subset Estimator

Open a font, paste the text your site shows in it and see how small the font gets when it only carries the glyphs you use.

Font Subset Estimator at a glanceIllustration: 1, Font + your text; 2, processed in your browser; 3, Subset size.Font Subset EstimatorAaaa1Font + your text2.5 s3Subset size2In yourbrowser
1 Font + your text 2 processed on your device 3 Subset size

Font Subset Estimator

Font and text

Paste headings, navigation and body copy, or a whole page's text. Repeated characters count once.

    File sizes

    Your text in the subset

    Drawn with the subset this page built. Characters it doesn't have fall back to a system font.

    CSS and the command for the real WOFF2

    @font-face
    pyftsubset command

    By script range

    RangeIn the fontYour text usesMissing from the fontWOFF2 if split (est.)

    01

    What it does

    Reads TTF, OTF, WOFF or WOFF2 on your device, keeps the glyphs your text needs and estimates the subset's WOFF2 size.

    • Reads TTF, OTF, WOFF and WOFF2, including the WOFF2 glyph transform and variable fonts
    • Follows composite glyphs and the font's default ligatures, fractions and alternates, as pyftsubset does
    • A real TrueType subset to download (.woff or .ttf), previewed in the browser
    • WOFF2 size estimated per table, checked against pyftsubset on ten fonts

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    Glyphs kept, subset sizes, missing characters, unicode-range @font-face CSS, a subset file and the pyftsubset command, with a Copy and a Download button on every result.

    • Performance
    • Fonts
    • WOFF2
    • Subsetting

    Why it matters

    A web font usually carries far more than a page needs: accented letters for dozens of languages, Greek and Cyrillic, old-style figures, arrows and symbols. Every byte is on the critical path for the text that uses it, so a 120 KB font that could be 15 KB delays the first readable paint on every slow connection. Subsetting keeps only the glyphs your text uses, and unicode-range lets the browser download a script's file only when the page needs it.

    This tool reads the font on your device, including WOFF2 files, which it decompresses with a Brotli decoder and the WOFF2 glyph transform. It maps your text to glyphs through the font's cmap, adds the glyphs that the default ligatures, fractions and contextual alternates can swap in, and follows accented letters to their parts, matching pyftsubset's glyph count on the sample fonts. It then builds a real subset you can preview and download, estimates the size a full subsetter would reach as WOFF2, splits the font into Google Fonts-style script ranges, lists characters the font doesn't have, and writes the @font-face rules and the exact pyftsubset command for production.

    How it works

    1. InputA font file and the text your site shows
    2. In your browserGlyphs mapped, ligatures and accents followed, a real subset built
    3. OutputSizes, missing characters, @font-face CSS and the command

    Where it fits in a designer's workflow

    1. Plan
    2. Design
    3. Build
    4. Test
    5. Launch
    Cutting web font weight before launch, or checking a font covers your languages.

    By the numbers

    WOFF2 saved by subsetting ten web fonts to the sample text (estimated by this tool)Inter: 47.1 KB → about 11.9 KB: −75%; Fraunces: 65.7 KB → about 28.5 KB: −57%; Lora: 36.9 KB → about 11.5 KB: −69%; Merriweather: 95.3 KB → about 28.0 KB: −71%; DM Sans: 61.3 KB → about 21.3 KB: −65%; Montserrat: 37.1 KB → about 13.3 KB: −64%; Playfair Display: 37.5 KB → about 15.2 KB: −59%; Source Sans 3: 28.2 KB → about 10.4 KB: −63%; Space Grotesk: 21.8 KB → about 7.9 KB: −64%; DM Serif Display: 24.2 KB → about 10.1 KB: −58%Inter: 47.1 KB → about 11.9 KB−75%Fraunces: 65.7 KB → about 28.5 KB−57%Lora: 36.9 KB → about 11.5 KB−69%Merriweather: 95.3 KB → about 28.0 KB−71%DM Sans: 61.3 KB → about 21.3 KB−65%Montserrat: 37.1 KB → about 13.3 KB−64%Playfair Display: 37.5 KB → about 15.2 KB−59%Source Sans 3: 28.2 KB → about 10.4 KB−63%Space Grotesk: 21.8 KB → about 7.9 KB−64%DM Serif Display: 24.2 KB → about 10.1 KB−58%
    Found by this tool with its sample text (60 characters, an English product page) on the ten fonts it ships with. Each file was already cut down to mostly Latin characters, and subsetting to the text still removed most of it. The tool's glyph count matched pyftsubset's on every font to within 6 glyphs, and its WOFF2 estimate was within 34% of pyftsubset's real file (median 6%). Source: web.dev: Best practices for fonts; fontTools: pyftsubset; W3C: WOFF 2.0.
    Show the numbers as a table
    FontGlyphs in fontGlyphs keptOriginal WOFF2Estimatepyftsubset WOFF2pyftsubset glyphs
    Inter5189147.1 KB11.9 KB13.7 KB90
    Fraunces2457065.7 KB28.5 KB26.8 KB70
    Lora2826736.9 KB11.5 KB12.1 KB67
    Merriweather2908695.3 KB28.0 KB20.9 KB86
    DM Sans2707661.3 KB21.3 KB22.9 KB76
    Montserrat3228437.1 KB13.3 KB14.2 KB84
    Playfair Display31810037.5 KB15.2 KB13.6 KB100
    Source Sans 33249628.2 KB10.4 KB10.0 KB90
    Space Grotesk2918521.8 KB7.9 KB7.7 KB85
    DM Serif Display2416824.2 KB10.1 KB9.8 KB67

    How to use it

    1. Pick a sample font or open your own.
    2. Paste the text your site shows in it.
    3. Choose what to keep: your text, your text plus Basic Latin, or whole scripts.
    4. Read the sizes and missing characters, then copy the CSS and command.

    FAQ

    Is my font uploaded?

    No. The file is read and subset in your browser. Nothing is sent anywhere.

    Why is the .woff download bigger than the estimate?

    It keeps the original glyph IDs, so the kerning and ligature tables stay whole. A full subsetter renumbers glyphs and trims those tables; the pyftsubset command gives you that WOFF2.

    How accurate is the WOFF2 size?

    On the ten sample fonts the typical error against pyftsubset's real WOFF2 was about 6%, and the worst was about a third. It's an estimate because the browser can decompress Brotli here but not compress it.

    What happens to characters I didn't include?

    The browser draws them with the next font in your font-family list. With unicode-range it can also fetch another subset file that covers them.

    Does it keep ligatures and kerning?

    Yes. The font's default features, such as fi ligatures and fractions, keep their glyphs, and kerning applies to the glyphs kept. Stylistic sets and small caps are left out unless you add them.

    Can I subset variable fonts?

    Yes. Each glyph's variation data is kept or dropped with the glyph, so the subset still covers the full weight range.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk