Convert a font to Base64
Sometimes a page cannot load a second file: an HTML email, a single-file report, a widget that must work offline. Embedding the font as a data URI removes the request, at the cost of about a third more bytes.
- Free, unlimited
- 100% on-device
- No sign-up
Convert a font to Base64
Drop your font files here
Or choose files from your device
TTF, OTF, WOFF, WOFF2, TTC or OTC in · up to 20 files · max 40 MB each
Every file is parsed and converted in this tab. Nothing is uploaded.
No font added yet.
Output
Font details
Three steps — nothing to install
Drop the font
TTF or OTF works best as the source; the output is always WOFF2 before encoding, because that is the smallest starting point.
Choose Base64 mode
You get a complete @font-face rule with the data URI already in place, ready to copy.
Paste and test
Paste it into the stylesheet or the email template and check the result in the client that will render it.
When Base64 is the right answer
HTML email is the main case: many clients block external fonts, and a data URI travels inside the message. Single-file HTML reports, offline kiosks and embedded widgets have the same problem — one file has to carry everything.
For an ordinary website it is the wrong answer. A data URI cannot be cached separately, it inflates the CSS by about a third, and it blocks the stylesheet from finishing until the font has downloaded.
What the encoding actually costs
Base64 turns every three bytes into four characters, so a 180 KB WOFF2 becomes roughly 240 KB of text. Email clients also have size limits, and Gmail clips messages around 102 KB — which is why a subsetted font, not a full family, is usually what belongs in an email.