MIME Type Detector
Detect MIME types from file extensions or uploaded files.
Recommended tools
Affiliate links — we may earn a commission if you sign up.
About the MIME Type Detector
The MIME Type Detector maps a file extension or an uploaded file to its MIME type, surfacing the standard media identifier that servers, browsers, and APIs use to interpret bytes correctly. You can type an extension such as pdf or .png in the File extension field, with or without the leading dot, or drag a file onto the dashed upload zone. When you provide both, the tool cross-checks the browser-reported file.type against the extension lookup and flags any mismatch, a telltale sign that a file was renamed or mislabelled. The Detection result section shows the extension, the MIME type, a color-coded category, and common uses for every match. If you upload a file, an extra metadata panel reports its name, formatted size, the actual browser-reported type, and the last-modified timestamp. The underlying reference table covers 118 common extensions across image, video, audio, text, and application categories, and a live search filters rows by extension, MIME value, or category. Because the lookup runs entirely on the client, nothing you type or drop leaves your machine. The tool is especially handy when configuring Content-Type headers, debugging downloads, validating uploads, or checking whether an API returned the media type you expected.
Examples
Type "png" into the File extension field.
Extension .png, MIME type image/png, category image, uses "Lossless web images, screenshots, transparency."
Drop a file named cover-photo.jpg onto the upload area.
Detection result .jpg → image/jpeg plus an Uploaded file metadata grid with name, formatted size, browser-reported type, and last modified.
Search the reference table for "tsx".
A single filtered row: .tsx → MIME type text/typescript, category text, badge colored in the category tone.
How to use
- 1
Enter an extension such as "pdf" or "tsx" in the File extension field — the hint confirms the leading dot is optional.
- 2
Alternatively click "Choose a file" or drop a file onto the dashed drag-and-drop zone; the loaded file name appears below the button.
- 3
Read the Detection result cards for Extension, MIME type, and the color-coded Category, plus the Common uses panel.
- 4
If you uploaded a file, check the Uploaded file metadata grid and any amber mismatch banner when file.type disagrees with the extension.
- 5
Use the "Search extension, MIME, or category…" box in the Extension reference card to filter all 118 rows.
Common use cases
- Setting correct Content-Type headers for files served from an API or static host.
- Auditing upload endpoints to confirm the stored media type matches the file extension.
- Debugging downloads that arrive as application/octet-stream because the server omitted the MIME type.
- Teaching or documenting file-format conventions across image, audio, text, and archive types.
- Flagging renamed files — for example a text file saved with a .pdf extension — for manual review.
- Confirming the expected MIME value before writing CDN caching or email attachment rules.
Best practices
- Never make security decisions from the extension alone; pair the lookup with content inspection or server-side validation.
- Treat a missing browser-reported file.type as "unknown" rather than a match — empty values never trigger the mismatch banner.
- Keep in mind MIME registrations evolve; re-check common values like text/javascript when standards bodies update the registry.
- Use the detections as a first pass, then confirm unusual results against the Reference table or an inspector.
- Search deliberately: substrings match loosely, so a query like "z" surfaces many rows while longer terms narrow results fast.
- Design APIs to emit the same MIME values shown here so clients parse responses without workarounds.
Tips
- Typing "jpg" and "jpeg" both return image/jpeg — the database treats them as one media type.
- A quick search for "font" filters straight to the TTF, OTF, WOFF, and WOFF2 rows.
- The mismatch banner only appears when the browser actually reports a file.type; empty values never trigger it.
- Pair the detector with upload validation so server-side checks reject files whose extension and type disagree.
Frequently asked questions
Explore more media tools
Browse the full collection of media tools on the hub, or jump back to all categories.