GALAXY OF TOOLS

DEV SECTOR

MIME Type Lookup

Find the MIME type of any file extension, or the extensions of any type — and detect a file’s real format.

1,046 media types and 1,239 extensions from mime-db 1.54.0 (MIT).

image/webp
IANA registered
Extensions
.webp
Compressible
Probably no — media formats are usually compressed (not set in mime-db)
In the browser
Shown in the browser
Header
Content-Type: image/webp

Detect a file’s real type

The extension in a file name is only a label. Drop files here to read their magic bytes — the signature at the start of the file — and compare the real format with the extension.

Drop files to check their type or click to choose · any size · read on your device, never uploaded

    Lookups and file checks run entirely in your browser. Only the first and last 64 KB of each file (plus a ZIP’s file list) are read, and nothing is uploaded.

    MIME type lookup for file extensions and Content-Type headers

    This MIME type lookup converts in both directions: type an extension such as .webp or a file name and you get its media type (image/webp); type a media type such as application/json and you get its extensions. Each result shows whether the type is registered with IANA, which older or unofficial names point to it, whether browsers display it or download it, whether it is worth compressing, and the exact Content-Type header to send.

    The second half of the page answers a different question: what is this file really? Drop any file and the tool reads its magic bytes — the signature at the start of most formats — to identify the true format, then warns you when the extension does not match. That catches photos renamed from .heic to .jpg, “PDFs” that are really Windows programs, and Office files hiding macros. Files never leave your device.

    How to use the MIME Type Lookup

    1. Type an extension (.svg), a file name (invoice.final.pdf) or a MIME type (text/csv) in “File extension, file name or MIME type”. Results appear as you type.
    2. Read the highlighted card: registration status, extensions, compressibility, browser behaviour and the Content-Type header, with a Copy button.
    3. When an extension has several types, the preferred one comes first and the alternatives follow. Aliases such as image/jpg point you to the correct name.
    4. To check real files, drop them on “Drop files to check their type” or click to choose. Each file gets a Matches, Mismatch or Check badge.
    5. Press “Look up …” under a checked file to see the full details of its detected type.

    MIME Type Lookup features

    Data from mime-db

    More than a thousand media types from mime-db 1.54.0 (MIT licence), the database used by the Node.js ecosystem, which combines the IANA registry with Apache and nginx lists.

    Aliases and outdated names

    About fifty common wrong or legacy names — image/jpg, audio/mp3, application/x-javascript, application/x-zip-compressed — map to the type you should use, citing the RFC.

    Magic-byte detection

    Recognises more than 100 formats: images, audio, video, fonts, archives, Office and OpenDocument files, e-books, executables, databases, disk images and text formats.

    Inside ZIP containers

    DOCX, XLSX, PPTX, EPUB, ODF, JAR and APK are told apart by reading the ZIP’s file list, and macro-enabled Office files are flagged.

    Private and fast

    Only the first and last 64 KB of each file are read, so even multi-gigabyte videos are checked instantly — and nothing is uploaded.

    Common MIME types

    ExtensionMIME typeNotes
    .htmltext/htmlAdd “; charset=utf-8”
    .js, .mjstext/javascriptThe only recommended JavaScript type since RFC 9239
    .jsonapplication/jsonNo charset parameter needed — JSON is UTF-8
    .jpg, .jpegimage/jpegNever image/jpg
    .webp / .avifimage/webp / image/avifBoth now IANA-registered
    .svgimage/svg+xmlWithout “+xml” browsers will not render it
    .mp4video/mp4audio/mp4 for audio-only .m4a
    .woff2font/woff2The font/ top-level type comes from RFC 8081
    .docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentA ZIP container underneath
    unknownapplication/octet-streamTells browsers to download the file

    Why the Content-Type header matters

    Browsers decide what to do with a response from its Content-Type header, not from the extension in the URL. Serve a stylesheet as text/plain and, with the X-Content-Type-Options: nosniff header that most sites send, the browser refuses to apply it; serve JavaScript with the wrong type and modules will not load. Uploads work the other way round: the browser guesses the type from the file name, so an upload form should check the content itself — exactly what the magic-byte checker on this page demonstrates.

    Text-based types such as HTML, CSS, JavaScript, JSON, SVG and XML often shrink to a fraction of their size with gzip or Brotli. JPEG, PNG, WebP, MP4, MP3, WOFF2 and ZIP are already compressed, so compressing them again wastes CPU time. To see the headers a live URL actually returns, use the HTTP Status Checker; to confirm a download has not been altered, compare its checksum with the File Hash Checker.

    Limits of magic-byte detection

    Some formats share a container, so the signature alone cannot always settle the question. An MP4 file may hold only audio; a ZIP may be any of dozens of formats; and plain text has no signature at all, so CSV, Markdown and source code all read as text. The tool reports what the bytes prove and says when it cannot be sure. Extracting the contents of an archive is a separate job for the ZIP Extractor.

    MIME Type Lookup FAQ

    What is the MIME type of a .docx file?

    application/vnd.openxmlformats-officedocument.wordprocessingml.document. Excel .xlsx files are application/vnd.openxmlformats-officedocument.spreadsheetml.sheet and PowerPoint .pptx files are application/vnd.openxmlformats-officedocument.presentationml.presentation.

    Is it image/jpg or image/jpeg?

    image/jpeg. image/jpg was never registered; browsers tolerate it, but servers and APIs should always send image/jpeg for .jpg and .jpeg files.

    Which MIME type should I use for JavaScript?

    text/javascript. RFC 9239 (2022) made it the one recommended type and marked application/javascript, application/x-javascript and the ecmascript types obsolete.

    How can I tell what type a file really is?

    Drop it on the checker in this MIME type lookup. It reads the signature bytes at the start of the file — for example 89 50 4E 47 for PNG or %PDF- for PDF — and compares the real format with the extension.

    Why does my browser download a file instead of opening it?

    Either the server sends a type the browser cannot display, such as application/octet-stream, or it adds a Content-Disposition: attachment header. Check the type in the card’s “In the browser” row.

    Are my files uploaded when I check them?

    No. The file is read with the browser’s File API on your own device — just the first and last 64 KB, plus a ZIP file’s directory — and nothing is sent to any server.

    You might also need