File Type Detector

Detect file type from contents.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

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

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

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?
Choose it here to see the type your browser assigns.
Can it detect a renamed file?
No. It trusts the extension.
Is the file uploaded?
No. It is not even read.

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 YouTube
  • How 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.