Home › Developer Tools › MIME Type Lookup

MIME Type Lookup

Type a file extension like .webp or a MIME type like application/pdf to get the answer instantly, browse 400+ extensions by category, or drop a file to check its real type from its first bytes.

ExtensionMIME typeFile typeCopy

Check a file's real type

Drop any file here or click to choose Reads only the first bytes (magic number) on your device – nothing is uploaded

Exports contain the rows currently shown (use the search and category filters to narrow them).

Advertisement
Advertisement

How to use the MIME Type Lookup

  1. Type an extension or MIME type in the search box, for example webp, .docx or image/svg+xml, and press Look up.
  2. Read the answer card for the exact match and copy it, or scan the table for related types.
  3. Filter by category to browse every image, audio, video, font or document type.
  4. Drop a file into Check a file's real type to see what its content actually is and whether the extension matches.
  5. Export the filtered list as CSV or JSON, or as ready-to-paste nginx or Apache configuration.

How MIME types are structured

A MIME type has a type and a subtype separated by a slash, optionally followed by parameters: text/html; charset=utf-8. The top-level type tells software the broad kind of data:

Top-level typeUsed forExamples
text/Human-readable texttext/plain, text/html, text/css, text/csv, text/javascript
image/Pictures and graphicsimage/png, image/jpeg, image/webp, image/svg+xml
audio/Soundaudio/mpeg, audio/wav, audio/ogg, audio/flac
video/Moving picturesvideo/mp4, video/webm, video/quicktime
font/Font filesfont/woff2, font/ttf, font/otf
model/3D modelsmodel/gltf-binary, model/stl, model/obj
application/Everything else: binary data, documents, archives, structured dataapplication/pdf, application/zip, application/json
multipart/, message/Containers of several parts, emailsmultipart/form-data, message/rfc822

Subtypes have their own conventions: vnd. marks a vendor-specific type (application/vnd.ms-excel), x- an unregistered one (application/x-7z-compressed), and a suffix such as +xml, +json or +zip says which generic format the data is built on (image/svg+xml, application/ld+json, application/epub+zip).

The MIME types web developers need most

ExtensionMIME typeNote
.htmltext/htmlAdd ; charset=utf-8
.csstext/cssBrowsers refuse stylesheets served with the wrong type
.js, .mjstext/javascriptModule scripts require a JavaScript type
.jsonapplication/jsonJSON is UTF-8 by definition
.svgimage/svg+xmlWrong type means SVG shows as text or downloads
.webp / .avifimage/webp / image/avifModern image formats
.woff2font/woff2Fonts also need CORS headers across domains
.wasmapplication/wasmRequired for WebAssembly streaming compilation
.webmanifestapplication/manifest+jsonProgressive web app manifest
.mp4 / .webmvideo/mp4 / video/webmServe with byte-range support for seeking

Common file signatures (magic numbers)

FormatFirst bytes (hex)As text
PNG89 50 4E 47 0D 0A 1A 0A‰PNG
JPEGFF D8 FFÿØÿ
GIF47 49 46 38 39 61GIF89a
PDF25 50 44 46 2D%PDF-
ZIP, DOCX, XLSX, EPUB, APK50 4B 03 04PK
GZIP1F 8B
WebP / WAV / AVI52 49 46 46 … 57 45 42 50 / 57 41 56 45 / 41 56 49 20RIFF…WEBP / WAVE / AVI
MP4, MOV, HEIC, AVIF?? ?? ?? ?? 66 74 79 70….ftyp + brand
Windows EXE / DLL4D 5AMZ
WebAssembly00 61 73 6D\0asm

Tip: never trust the extension or the browser-reported type of an uploaded file on a server. Check the signature, as the file checker above does, and only then accept or process the file.

Frequently asked questions

What is a MIME type?

A MIME type (officially a media type) is a label such as image/png or application/pdf that tells browsers and other software what kind of data a file contains. Web servers send it in the Content-Type header, and browsers use it to decide whether to display, play or download a file.

What MIME type should I use for an unknown file?

Use application/octet-stream. It means arbitrary binary data, and browsers will offer to download the file rather than try to display it.

What is the MIME type for JavaScript?

text/javascript. RFC 9239 (2022) made it the official type for JavaScript and JavaScript modules; application/javascript still works but is obsolete.

Why does my server send the wrong Content-Type?

Servers map extensions to types with a configuration file such as nginx mime.types or Apache AddType directives. If an extension is missing, the server falls back to a default like application/octet-stream or text/plain. Use the nginx or Apache export to add the missing entries.

How does the file check work?

Most formats start with a fixed signature, or magic number, such as 89 50 4E 47 for PNG or %PDF for PDF. The tool reads only the first and last 64 KB of the file in your browser, compares them with known signatures and tells you if the content does not match the extension. The file is never uploaded.

Are DOCX, XLSX and EPUB files really ZIP files?

Yes. They are ZIP archives with a specific internal structure, which is why their signature is the ZIP header PK. The checker looks inside the archive for folders like word/, xl/ or ppt/, or for an EPUB mimetype entry, to report the exact format.

Related tools