Add your font
Drag a .woff2, .woff, .ttf, .otf or .eot file onto the drop zone, or click to browse. Multiple files are fine.
Runs 100% in your browser — nothing is uploaded
Turn any TTF, OTF, WOFF or WOFF2 file into a Base64 data URI and a ready-to-paste @font-face rule. Drop a font, preview it live, copy the CSS.
Drop font files here, or click to browse
Convert several fonts at once — each one gets its own @font-face rule.
The quick brown fox jumps over the lazy dog
Rendered with the encoded font itself — if it shows here, your @font-face rule works.
Three steps, no sign-up, and the file never leaves your machine.
Drag a .woff2, .woff, .ttf, .otf or .eot file onto the drop zone, or click to browse. Multiple files are fine.
Rename the font family, set the weight, style and font-display, then switch between a full @font-face rule, a data URI or the raw Base64 string.
Check the live preview, then copy the result to your clipboard or download it as a .css file and drop it into your project.
Inlining a font removes a network request, but it also inflates your CSS by roughly 33% and blocks rendering until the stylesheet finishes downloading. Use it deliberately.
Everything people usually ask about encoding fonts as Base64.
No. The conversion runs entirely in your browser using the FileReader API. Your font file never leaves your device, so licensed and unreleased fonts stay private. You can even load this page once, go offline, and it still works.
TTF, OTF, WOFF, WOFF2 and EOT. For the web, WOFF2 is strongly recommended — it is already compressed, so it produces a far smaller Base64 string than the same font as TTF or OTF.
Base64 represents every 3 bytes of binary data as 4 ASCII characters, so the output is about 33% larger than the source. The tool shows the exact original size, encoded size and overhead for every font you add.
No. Inlining saves an HTTP request but blocks CSS parsing and cannot be cached separately from your stylesheet. It works best for small icon fonts or a single critical weight under roughly 50 KB. Large families are better served as normal .woff2 files with font-display: swap.
Paste the generated CSS into your stylesheet, then reference the family in any rule — for example body { font-family: "MyFont", sans-serif; }. No font file needs to be hosted alongside it.
Data URIs in @font-face are supported by every modern browser. WOFF2 covers everything current; add a WOFF fallback only if you still support very old browsers. EOT is only relevant for legacy Internet Explorer.
The tool accepts files up to 20 MB, but that is a safety cap, not a recommendation. Anything above a few hundred KB will noticeably slow your CSS down — the size badge on each file flags this for you.
Yes. Completely free, no sign-up, and no limit on how many fonts you convert.
Other browser-based utilities from SeeB4Coding.