Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

MIME Type Lookup

Find the MIME type for a file extension or the extensions for a MIME type, with nginx and Apache lines, and check what a file really is.

Type a file extension such as .webp or docx to get its MIME type, or type a MIME type such as application/json to see which extensions use it. The list covers about 150 common formats on the web: pages, scripts, images, audio, video, fonts, documents, archives, programs, certificates and data files, with the category, a short note, and ready-to-paste lines for nginx, Apache and the Content-Type header.

You can also check a file: choose it or drop it on the page to see the type for its extension, the type your browser reports, and what its first bytes say it really is. A mismatch often means the file was renamed. Files are only read on your device.

How to use MIME Type Lookup

  1. Type an extension, a MIME type or a word such as font or video.
  2. Copy the MIME type, or open Server for nginx and Apache lines.
  3. To check a file, choose it with Check a file or drop it on the page.
  4. Compare the type by extension, by the browser and by the content.

Features

  • About 150 extensions and MIME types
  • Search in both directions
  • nginx, Apache and HTTP header lines
  • Checks a file's real type from its content
  • Notes on obsolete and alternative types
  • Files are read locally; nothing is uploaded

What is a MIME type?

A MIME type, officially a media type, is a label of the form type/subtype that tells software what kind of data it is handling. Web servers send it in the Content-Type header, e-mail uses it for attachments, and browsers rely on it, not on the file extension, to decide whether to show, play or download a file. Types are registered with IANA; those starting with x- or vnd. are unregistered or vendor-specific.

ExtensionMIME type
.htmltext/html
.jstext/javascript
.jsonapplication/json
.webpimage/webp
.svgimage/svg+xml
.woff2font/woff2
.mp4video/mp4
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document

Why the right type matters

A wrong Content-Type causes real bugs. Browsers refuse to run scripts and stylesheets served with the wrong type when the X-Content-Type-Options: nosniff header is set, and WebAssembly only compiles quickly when served as application/wasm. Fonts with the wrong type may be blocked, SVG served as text/plain shows its code instead of the picture, and files sent as application/octet-stream are downloaded rather than displayed. If an upload form accepts files by MIME type, check the content too, because the browser's type comes only from the extension.

Setting types on a server

nginx reads types from its mime.types file; add missing ones in a types block. Apache uses AddType lines in its configuration or a .htaccess file. Cloud storage such as Amazon S3 or Cloudflare R2 stores a Content-Type for every object at upload, so set it correctly in your upload script. For text formats add charset=utf-8 so accented letters and symbols display correctly.

Checking what a file really is

Many formats start with a fixed signature, sometimes called magic bytes: PNG files begin with the bytes 89 50 4E 47, PDF files with %PDF-, ZIP-based formats such as DOCX and XLSX with PK. The checker reads the first few kilobytes of the file in your browser and recognises the common image, audio, video, document and archive formats this way. Plain text formats such as CSV and JSON have no signature, so they are reported as text.

Uploads and security

Never trust the type a browser sends with an upload: it is guessed from the file name, so anyone can upload a program renamed to photo.jpg. Servers should check the file content, store uploads outside the website folder or on a separate domain, and serve user files with the X-Content-Type-Options: nosniff header and, for anything that is not an image, a Content-Disposition: attachment header so it downloads instead of opening in the browser.

Frequently asked questions

What is the MIME type for JavaScript?

text/javascript, as standardised in RFC 9239. application/javascript and application/x-javascript are obsolete but still accepted.

What is the MIME type of a .docx file?

application/vnd.openxmlformats-officedocument.wordprocessingml.document.

What should I use for an unknown file?

application/octet-stream, which tells the browser to download the file rather than display it.

Is it image/jpg or image/jpeg?

image/jpeg. image/jpg is not a registered type, although some software accepts it.

How do I find a file's real type?

Use Check a file. It compares the extension, the type the browser reports and the signature in the file's first bytes.

Is my file uploaded?

No. Only the first few kilobytes are read, in your browser.

Related tools