Skip to content
DEV TOOL

MIME type finder — magic bytes + server config export

Bidirectional lookup, in-browser magic-byte detection, and snippet export for five server stacks — all local, no file upload.

Runs locally in the browser — the database is embedded, file bytes never upload.

100 MIME types · 81 IANA-registered · 15 modern

Magic-byte detection

Category

Filters

Results

100 of 100

Export server config

Generated from the current filter selection — refine filters, then copy or download the config.

# nginx types — generated by kittokit mime-type-finder
# Drop this block into your http {} or server {} context.
types {
    application/atom+xml    atom;
    application/epub+zip    epub;
    application/gzip    gz;
    application/java-archive    jar;
    application/javascript    js mjs;
    application/json    json;
    application/ld+json    jsonld;
    application/manifest+json    webmanifest;
    application/msword    doc;
    application/octet-stream    bin;
    application/pdf    pdf;
    application/postscript    ps eps;
    application/rss+xml    rss;
    application/rtf    rtf;
    application/sql    sql;
    application/vnd.android.package-archive    apk;
    application/vnd.apple.installer+xml    mpkg;
    application/vnd.microsoft.portable-executable    exe dll;
    application/vnd.ms-excel    xls;
    application/vnd.ms-powerpoint    ppt;
    application/vnd.oasis.opendocument.presentation    odp;
    application/vnd.oasis.opendocument.spreadsheet    ods;
    application/vnd.oasis.opendocument.text    odt;
    application/vnd.openxmlformats-officedocument.presentationml.presentation    pptx;
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet    xlsx;
    application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
    application/vnd.rar    rar;
    application/wasm    wasm;
    application/x-7z-compressed    7z;
    application/x-bzip2    bz2;
    application/x-debian-package    deb;
    application/x-iso9660-image    iso;
    application/x-msdownload    exe dll;
    application/x-msi    msi;
    application/x-rar-compressed    rar;
    application/x-rpm    rpm;
    application/x-shockwave-flash    swf;
    application/x-tar    tar;
    # application/x-www-form-urlencoded (no extensions defined)
    application/x-xz    xz;
    application/xhtml+xml    xhtml xht;
    application/xml    xml;
    application/yaml    yaml yml;
    application/zip    zip;
    application/zstd    zst;
    audio/aac    aac;
    audio/flac    flac;
    audio/midi    mid midi;
    audio/mp4    m4a;
    audio/mpeg    mp3;
    audio/ogg    ogg oga;
    audio/opus    opus;
    audio/wav    wav;
    audio/webm    weba;
    font/collection    ttc;
    font/otf    otf;
    font/ttf    ttf;
    font/woff    woff;
    font/woff2    woff2;
    image/apng    apng;
    image/avif    avif;
    image/bmp    bmp;
    image/gif    gif;
    image/heic    heic heif;
    image/heic-sequence    heics;
    image/jpeg    jpg jpeg jpe jfif;
    image/jxl    jxl;
    image/png    png;
    image/svg+xml    svg svgz;
    image/tiff    tif tiff;
    image/vnd.adobe.photoshop    psd;
    image/vnd.microsoft.icon    ico;
    image/webp    webp;
    image/x-icon    ico;
    image/x-portable-pixmap    ppm;
    model/gltf-binary    glb;
    model/gltf+json    gltf;
    model/obj    obj;
    model/stl    stl;
    text/calendar    ics;
    text/css    css;
    text/csv    csv;
    # text/event-stream (no extensions defined)
    text/html    html htm;
    text/javascript    js mjs cjs;
    text/markdown    md markdown;
    text/plain    txt;
    text/tab-separated-values    tsv;
    text/vcard    vcf;
    text/xml    xml;
    text/yaml    yaml yml;
    video/3gpp    3gp;
    video/av1    av1;
    video/mp4    mp4 m4v;
    video/mpeg    mpeg mpg;
    video/ogg    ogv;
    video/quicktime    mov qt;
    video/webm    webm;
    video/x-matroska    mkv;
    video/x-msvideo    avi;
}

How It Works

  1. 01

    Paste text or code

    Paste your content into the input field or type directly.

  2. 02

    Instant processing

    The tool processes your content immediately and shows the result.

  3. 03

    Copy result

    Copy the result to your clipboard with one click.

Privacy

All calculations run directly in your browser. No data is sent to any server.

Finding the right MIME type is harder than it should be in 2026: hundreds of IANA codes, deprecated `x-` aliases, modern formats missing from older cheatsheets, and the `Content-Type` header cannot be inferred from filename alone. The finder solves it in one tool — search by extension or MIME, drop a file for magic-byte detection, and export configs for five server stacks.

01 — How to Use

How do you use this tool?

  1. Use the search field — enter an extension (`.webp`), a MIME (`image/webp`), or a keyword.
  2. Drag a file onto the drop zone — the first 32 bytes are read locally and matched against the magic-byte table.
  3. If filename and bytes disagree, a mismatch warning appears — bytes are authoritative.
  4. Category pills filter by application/image/audio/video/font/model/text. IANA and modern toggles narrow further.
  5. Copy the server config for your stack — Apache `mime.types`, nginx `types { }`, IIS `web.config`, Express middleware, or Cloudflare Worker.

What does the MIME type finder do?

The finder is a bidirectional lookup tool plus magic-byte detector for MIME types. You search for a file extension (.webp, .heic, .wasm) and get the canonical MIME plus alias list, or you enter a MIME (image/webp, application/wasm) and see the associated extensions with a “canonical first” marker. Both directions live in one search field because the most common question is one of those two: “what Content-Type for .webp?” or “which extension comes out of audio/ogg?”.

Per entry the tool shows: IANA status (registered or deprecated alias), canonical and alternate extensions, a one-sentence format description, optional browser support for modern codecs (AVIF, HEIC, JXL, WOFF2, WebAssembly), and the magic-byte signature used for detection.

How does magic-byte detection work?

Drag a file onto the drop zone — the first 32 to 64 bytes are read locally via FileReader and matched against the signature table. JPEG identifies itself with FF D8 FF at byte 0, PNG with 89 50 4E 47 0D 0A 1A 0A, PDF with 25 50 44 46 (ASCII “%PDF”), WebAssembly with 00 61 73 6D. Container formats like HEIC, AVIF, and MP4 use ISO Base Media boxes with the ftyp marker at byte 4 — the brand string after it (heic, avif, isom, mp42) decides which concrete variant is present.

The drop is authoritative: if the filename says .jpg but the bytes say 89 50 4E 47, a mismatch warning appears. Bytes never lie — a file can be renamed at any time. This is the only reliable way to check a MIME type for upload validation when the User-Agent headers are not trustworthy.

What’s the difference between IANA-registered and x- aliases?

IANA-registered MIME types live in the official Media Types Registry and are formally standardised via RFC 6838. The vnd. prefix marks vendor-specific codes (e.g. application/vnd.ms-excel for .xls) that map to a specific vendor. The x- prefix used to mean “experimental” but was declared an anti-pattern in 2012 by RFC 6648: new codes should be registered directly, not introduced as x-.

In practice some duplicates remain in 2026: image/x-icon (legacy, browser-tolerated) vs image/vnd.microsoft.icon (IANA-registered since 2003), or application/x-rar-compressed (deprecated) vs application/vnd.rar (IANA since 2014). The tool’s IANA-registered only toggle hides the x- aliases so new server configs use the modern codes. Existing servers should accept both — browsers historically often send the legacy prefix.

Which modern formats does the finder cover in 2026?

The database knows the important new codecs of the last few years, including browser support data sourced from Can I Use:

  • Image: AVIF (image/avif, AV1-based, Chrome 85+/Firefox 93+/Safari 16+), HEIC (image/heic, HEVC-based, Safari 17+), JXL (image/jxl, royalty-free, Firefox 111+/Safari 17+), WebP (image/webp, ubiquitous).
  • Audio: Opus (audio/opus, low-latency, RFC 6716), FLAC (audio/flac).
  • Video: AV1 (video/av1, royalty-free, Chrome 70+/Firefox 67+/Safari 17+), WebM container.
  • Font: WOFF2 (font/woff2, Brotli-compressed, the canonical web font since 2018).
  • Application: WebAssembly (application/wasm, mandatory for streaming compilation), Web App Manifest (application/manifest+json, mandatory for PWA install banners), JSON-LD (application/ld+json, schema.org structured data), Zstandard (application/zstd, IANA 2018).
  • 3D model: glTF binary (model/gltf-binary, single-file 3D asset for WebGL/three.js).

The “modern formats only” toggle filters down to these 2018-2026 additions — useful when wiring up a modern static-asset server that doesn’t need to know about the older DCT/RGB/indexed formats.

Which server configs can the finder export?

Five targets, all generated from the current filter selection:

  • Apache mime.types — one-MIME-per-line format with space-separated extensions. Drop directly into the server config.
  • nginx types { } — block for http {} or server {} context with correct semicolons.
  • IIS web.config<staticContent> XML with <mimeMap> elements for each extension/MIME pair.
  • Express/Koa middleware — JavaScript snippet with a MIME_BY_EXT map and a setHeaders function that plugs into express.static options.
  • Cloudflare Worker — default fetch handler that rewrites the Content-Type response header based on the URL extension — useful when the origin emits the wrong MIME.

Workflow: set category + IANA + modern filters, then pick an export tab. The tool shows the snippet live, the copy button puts it on the clipboard, the download button saves it with the server-typical filename (mime.types, web.config, mime.types.conf, .js).

Which magic-byte signatures does the finder recognise?

More than 40 format signatures, grouped by complexity:

  • Trivial (1-4 bytes at offset 0): JPEG (FF D8 FF), PNG (89 50 4E 47 0D 0A 1A 0A), GIF (47 49 46 38 37 61 or …39 61), PDF (25 50 44 46), ZIP/OOXML (50 4B 03 04), 7z (37 7A BC AF 27 1C), Gzip (1F 8B), bzip2 (42 5A 68), Zstandard (28 B5 2F FD).
  • RIFF containers (with wildcard bytes for size): WebP (RIFF????WEBP), WAV (RIFF????WAVE), AVI (RIFF????AVI ).
  • ISO Base Media boxes (at offset 4 after size prefix): MP4 (ftypisom, ftypMSNV, ftypmp42), HEIC (ftypheic, ftypheix, ftypmif1), AVIF (ftypavif), QuickTime (ftypqt ), 3GPP (ftyp3gp4).
  • WebAssembly: 00 61 73 6D plus a 4-byte version field.
  • Font containers: WOFF (wOFF), WOFF2 (wOF2), TrueType (00 01 00 00), OpenType (OTTO), font collection (ttcf).
  • Legacy Office: OLE Compound (D0 CF 11 E0 A1 B1 1A E1) for .doc/.xls/.ppt/.msi.
  • Archives: RAR v4 (52 61 72 21 1A 07 00), RAR v5 (52 61 72 21 1A 07 01 00), Debian (!<arch>), RPM (ED AB EE DB).

The wildcard syntax ?? lets variable bytes sit inside a signature — for RIFF containers that’s the 4-byte size field that differs per file. Same notation as in the PHP finfo magic database and the Unix file(1) tool.

How private is the byte detection?

Pure-client from start to finish. The complete MIME database is embedded in the JavaScript bundle (under 50 KB minified), search and filter logic runs on the main thread. On file drop the FileReader API reads the first 32-64 bytes into a Uint8Array in RAM — the file itself is not further touched, reading happens client-side, no bytes leave the browser. To verify: open F12, the Network tab, drop a file — no additional requests appear.

The server config export is also pure-JS: selected entries are formatted into string snippets, the copy button uses the Clipboard API, the download button creates a Blob object URL. No backend, no login, no telemetry pixel.

Last updated:

You might also like