File Type Detector
Detect file type from contents.
About this tool
Choose a file and press Process. The result is the MIME type your browser reports for it, or unknown if it has none.
How to use
How it works
Browsers assign a type from the file's extension, so report.pdf is application/pdf. The tool does not read the file's bytes to check the real format. A renamed file keeps the type of its new extension, and a file with an unrecognised or missing extension returns unknown.
Worked example
A PNG image
- Input
- logo.png
- Output
- image/png
- Walkthrough
- The browser maps the.png extension to image/png.
Limitations
- Based on the extension, not on file contents, so it cannot spot a disguised or renamed file.
- Unknown extensions return unknown.
- One file at a time.
Questions
How do I find out a file's type?
Can it detect a renamed file?
Is the file uploaded?
Features
- Browser-reported type
- Instant
- Private, in-browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Inspect Network Activity - Chrome DevTools 101
Chrome for Developers
Downloading and uploading files is a network workflow.
Watch on YouTubeHow base64 encoding works
Andrew Schmelyun
Files become Base64 when embedded in JSON or HTML.
Watch on YouTube
- Media Types
IANA
Official media-type registry for file extensions.
- MIME types
MDN
Content types when converting or renaming downloads.