Ever had a browser download a file when it should have shown it? A wrong content type often causes that exact problem, and it is easy to miss.
The MIME type checker on AskWebTools looks up the content type for a file extension. It also finds the extensions that belong to a MIME type.
It suits web developers, QA testers, and anyone who sets up file serving. You type a value, and the summary cards and detail fields update as you type.
Table of Contents
- What the MIME Type Checker Does
- How to Use It, Step by Step
- How the Lookup Works
- Worked Example
- How to Read the Results
- Tips for Web Work
- Limitations and Assumptions
- FAQs About the MIME Type Checker
What the MIME Type Checker Does
The tool matches your input against a built-in table of 39 common formats. It works in both directions, from extension to MIME type and back.
- Extension lookup: enter png or .png to get image/png.
- MIME lookup: enter application/pdf to get the .pdf extension.
- Summary cards: MIME Type, Primary Extension, and Category.
- Detail fields: MIME Content-Type, Primary Extension, Media Category, and Binary vs Text.
- Preset buttons: load .png, application/pdf, or .webp with one click.
How to Use It, Step by Step
- Find the box labeled File Extension or MIME Type. It starts with .json.
- Type an extension, such as .pdf, pdf, or mp4. You can also type a MIME type, such as image/png.
- Read the MIME Type, Primary Extension, and Category cards at the top.
- Check the four fields under MIME Type Details.
- Press Enter or Lookup MIME Type to run the lookup again. The result also updates as you type, so the button is optional.
- Press a Preset button to load a sample value.
How the Lookup Works
The lookup runs in four steps, all inside your browser. The flow below shows the order of those four steps.
Your Input→Clean the Text→Match Built-In Table→Result Cards
- The tool trims spaces, converts the text to lowercase, and removes any leading dots.
- It removes anything after a semicolon, such as charset=utf-8, and lists what it removed in a note.
- It compares the result with each extension, such as png, and each MIME type, such as image/png.
- Aliases, such as image/jpg, resolve to their standard type.
- When a match exists, it shows the stored MIME type, the primary extension, the category, and the Binary or Text value.
Worked Example
Sam is a front end developer who builds small static sites. Sam checks several values before setting content types for a small static site. Each row shows the actual output of the tool, typed exactly as shown.
| Input | MIME Content-Type | Primary Extension | Media Category | Binary vs Text |
| .png | image/png | .png | Image Graphics | Binary |
| application/pdf | application/pdf | .pdf | Document | Binary |
| text/csv | text/csv | .csv | Tabular Data | Text |
| jpeg | image/jpeg | .jpg | Image Graphics | Binary |
| image/jpeg | image/jpeg | .jpg | Image Graphics | Binary |
The jpeg row now shows .jpg, the same as the image/jpeg row. The tool adds a note that .jpeg is an alternate extension. Each MIME type has one primary extension, so both paths agree.
Sam also types txt, which the table lists as a text type. The result is text/plain, with the Plain Text category and a Text value. Sam then pastes text/html; charset=utf-8 into the same box. The tool returns text/html and lists charset=utf-8 as an ignored parameter.
How to Read the Results
- MIME Content-Type: the value to place in a Content-Type header or a server rule.
- Primary Extension: the extension with a leading dot. Alternate extensions appear in a note.
- Media Category: a group label, such as Document, Archive, or Video File.
- Binary vs Text: a Text or Binary label for each listed type.
Tips for Web Work
Set the right type on your server, then check the headers it sends back. Text formats are often sent with a charset parameter, so keep that in mind when you compare values.
To read the headers a server sends, try the HTTP Header Viewer. For a complete reference of types, the MIME Type Reference lists more values. If you only need an extension for a file name, the file extension finder can help. To check a real file, see the file type identifier. More utilities live in the developer tools hub on AskWebTools.
Limitations and Assumptions
- The table holds 39 entries and is not the IANA registry.
- Many formats are missing, such as legacy Office files, HEIC, and RTF.
- The lookup for application/javascript returns text/javascript, the IANA name, with a note.
- The tool uses .tif as the primary extension for image/tiff, with .tiff as an alternate.
FAQs About the MIME Type Checker
What Is a MIME Type?
A MIME type labels the format of data, such as image/png or application/pdf. Servers send it in the Content-Type header so browsers know how to display or download a response.
Does the Tool Check the Contents of My File?
No, the tool does not open files or read their contents. It reads only the text you type and compares it with the table. It never contacts a server, so file size has no effect.
What Does the Unknown Result Mean?
A type outside the table shows Unknown as its extension and Not in table as its category. The MIME field shows application/octet-stream, the generic default for unknown binary data. A message says the value is not a verified match. A MIME type outside the table keeps the value you typed.
Can I Use the Output to Configure My Server?
Yes, you can copy the MIME Content-Type value into your server rule. Then test a file you serve to confirm the header matches.
Can I Check Several Types at Once?
No, the tool checks one value at a time, so type the next value after reading this result. Each new entry you type replaces the previous result on screen.
This calculator gives general estimates only and is not professional advice. Reviewed for general accuracy by Prof. Dr. Khalil Mudassar, PhD.