MIME Type Detector

Detect MIME type from a file.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Choose a file and press Process. You get the MIME type your browser assigns, which you can use in a Content-Type header or upload form.

How to use

1
Step 1
Choose a file.
2
Step 2
Press Process.
3
Step 3
Copy the MIME type.

How it works

The browser derives the type from the file's extension. If it does not know the extension, the tool returns application/octet-stream, the generic type for arbitrary binary data. The file's contents are not inspected.

Worked example

A PDF

Input
invoice.pdf
Output
application/pdf
Walkthrough
The.pdf extension maps to application/pdf.

Limitations

  • Extension-based only.
  • Unknown extensions return application/octet-stream.
  • Does not check that the contents match the type.

Questions

What is a MIME type?
A label such as image/jpeg that tells software what kind of data a file holds.
What does application/octet-stream mean?
Generic binary data. The browser did not recognise the extension.
Can I look up a type from an extension?
Choose a file with that extension to see the mapped type.

Features

  • Content-Type value
  • Octet-stream fallback
  • Private, in-browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn JSON - Full Crash Course

    freeCodeCamp.org

    Structured file formats show up beside binary converters.

    Watch on YouTube
  • How base64 encoding works

    Andrew Schmelyun

    Files become Base64 when embedded in JSON or HTML.

    Watch on YouTube