How to complete reference: font format magic bytes
- Step 1Find the magic in your file — Read bytes 0–3 of any font file. Compare against the reference table below to identify the format. The Format Identifier tool automates this for you.
- Step 2Decode follow-up bytes — After the magic, each format has a different layout. TTF: numTables (uint16). WOFF: flavour (uint32). WOFF2: flavour + total length. The Identifier tool surfaces the relevant follow-up fields per format.
- Step 3Cross-reference with the spec — Each format has a public W3C or Microsoft spec. The magic is always the first thing the spec defines — useful entry point for deeper investigation.
Frequently asked questions
What's the magic for EOT (Embedded OpenType)?+
EOT files start with a fixed 36-byte header. The magic is at offset 34 (0x4C 0x50 — 'LP'). EOT is essentially dead — IE6–8 only. The JAD Identifier doesn't try to decode EOT because no current tooling needs it.
What about SVG fonts?+
SVG fonts are XML, not binary — the 'magic' is the SVG namespace declaration. Functionally deprecated since 2018; no current browser supports them inline. The Identifier reports 'unknown' for SVG files since they're not really fonts in the OpenType sense.
Are there font formats without magic bytes?+
Some legacy bitmap formats (BDF, PCF) use ASCII headers without strict magic. The Identifier doesn't support these — they're decades-old console-display formats with no web relevance.
Can I write my own format identifier?+
Yes — read the first 4 bytes and compare against the table. The full lookup is a 5-line function. The JAD tool wraps this with size info, table-count extraction, and human-readable descriptions, but the core check is trivial.
Privacy first
Every JAD Font tool runs entirely in your browser using opentype.js and the wawoff2 WASM Brotli encoder. Your fonts never leave your device — verified by zero outbound network requests during processing.