Skip to content
>_ TrueFileSize.com

MIME Type Lookup — File Extension to MIME Type

Search 128+ MIME types by file extension (.pdf, .jpg, .mp4) or by MIME string (application/pdf, image/png). Each entry shows the full name, magic bytes, category, and a link to download a sample file from TrueFileSize.

Filter by category

128 of 128 MIME types

ExtensionMIME TypeNameSample
.pdf
application/pdf
PDF DocumentDownload
.doc
application/msword
Microsoft Word (Legacy)
.docx
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Microsoft WordDownload
.xls
application/vnd.ms-excel
Microsoft Excel (Legacy)
.xlsx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Microsoft ExcelDownload
.ppt
application/vnd.ms-powerpoint
PowerPoint (Legacy)
.pptx
application/vnd.openxmlformats-officedocument.presentationml.presentation
Microsoft PowerPointDownload
.odt
application/vnd.oasis.opendocument.text
OpenDocument Text
.ods
application/vnd.oasis.opendocument.spreadsheet
OpenDocument Spreadsheet
.odp
application/vnd.oasis.opendocument.presentation
OpenDocument Presentation
.rtf
application/rtf
Rich Text Format
.epub
application/epub+zip
EPUB EbookDownload
.tex
application/x-tex
LaTeX Document
.pages
application/vnd.apple.pages
Apple Pages
.numbers
application/vnd.apple.numbers
Apple Numbers
.keynote
application/vnd.apple.keynote
Apple Keynote
.txt
text/plain
Plain TextDownload
.csv
text/csv
CSV (Comma-Separated)Download
.tsv
text/tab-separated-values
TSV (Tab-Separated)
.md
text/markdown
MarkdownDownload
.json
application/json
JSONDownload
.jsonl
application/x-ndjson
JSON Lines (NDJSON)
.geojson
application/geo+json
GeoJSON
.xml
application/xml
XMLDownload
.yaml
text/yaml
YAMLDownload
.yml
text/yaml
YAML (short ext)Download
.toml
application/toml
TOMLDownload
.ini
text/plain
INI Config
.env
text/plain
Environment Variables
.log
text/plain
Log FileDownload
.sql
application/sql
SQL ScriptDownload
.sqlite
application/x-sqlite3
SQLite DatabaseDownload
.db
application/x-sqlite3
SQLite Database (.db)Download
.parquet
application/vnd.apache.parquet
Apache ParquetDownload
.jpg
image/jpeg
JPEG ImageDownload
.jpeg
image/jpeg
JPEG ImageDownload
.png
image/png
PNG ImageDownload
.gif
image/gif
GIF ImageDownload
.webp
image/webp
WebP ImageDownload
.avif
image/avif
AVIF ImageDownload
.heic
image/heic
HEIC Image (iPhone)Download
.heif
image/heif
HEIF ImageDownload
.svg
image/svg+xml
SVG VectorDownload
.ico
image/x-icon
ICO IconDownload
.bmp
image/bmp
BMP BitmapDownload
.tiff
image/tiff
TIFF ImageDownload
.tif
image/tiff
TIFF ImageDownload
.apng
image/apng
Animated PNG
.psd
image/vnd.adobe.photoshop
Photoshop Document
.ai
application/postscript
Adobe Illustrator
.eps
application/postscript
Encapsulated PostScript
.raw
image/x-raw
Camera RAW
.cr2
image/x-canon-cr2
Canon RAW
.nef
image/x-nikon-nef
Nikon RAW
.jxl
image/jxl
JPEG XL
.mp4
video/mp4
MP4 VideoDownload
.mkv
video/x-matroska
MKV (Matroska)Download
.webm
video/webm
WebM VideoDownload
.mov
video/quicktime
QuickTime MOVDownload
.avi
video/x-msvideo
AVI VideoDownload
.wmv
video/x-ms-wmv
Windows Media Video
.flv
video/x-flv
Flash Video
.m4v
video/mp4
M4V (iTunes Video)
.3gp
video/3gpp
3GP Mobile Video
.ts
video/mp2t
MPEG Transport Stream
.m3u8
application/vnd.apple.mpegurl
HLS Playlist
.mpd
application/dash+xml
DASH Manifest
.mp3
audio/mpeg
MP3 AudioDownload
.wav
audio/wav
WAV AudioDownload
.flac
audio/flac
FLAC Lossless AudioDownload
.aac
audio/aac
AAC AudioDownload
.ogg
audio/ogg
OGG Vorbis AudioDownload
.opus
audio/opus
Opus Audio
.m4a
audio/mp4
M4A (AAC in MP4)
.wma
audio/x-ms-wma
Windows Media Audio
.aiff
audio/aiff
AIFF Audio (Apple)
.mid
audio/midi
MIDI Audio
.midi
audio/midi
MIDI Audio
.zip
application/zip
ZIP ArchiveDownload
.tar
application/x-tar
TAR Archive
.gz
application/gzip
Gzip Compressed
.tar.gz
application/gzip
Gzip TarballDownload
.tgz
application/gzip
Gzip Tarball (.tgz)Download
.bz2
application/x-bzip2
Bzip2 Compressed
.tar.bz2
application/x-bzip2
Bzip2 TarballDownload
.xz
application/x-xz
XZ Compressed
.7z
application/x-7z-compressed
7-Zip ArchiveDownload
.rar
application/vnd.rar
RAR ArchiveDownload
.zst
application/zstd
Zstandard Compressed
.lz4
application/x-lz4
LZ4 Compressed
.br
application/x-brotli
Brotli Compressed
.iso
application/x-iso9660-image
ISO Disk Image
.dmg
application/x-apple-diskimage
macOS Disk Image
.deb
application/vnd.debian.binary-package
Debian Package
.rpm
application/x-rpm
RPM Package
.ttf
font/ttf
TrueType FontDownload
.otf
font/otf
OpenType FontDownload
.woff
font/woff
WOFF Web Font
.woff2
font/woff2
WOFF2 Web FontDownload
.eot
application/vnd.ms-fontobject
EOT Font (Legacy IE)
Showing first 100 of 128 results — narrow your search

Setting Content-Type headers

# Nginx
location ~* \.pdf$ {
    add_header Content-Type application/pdf;
}

# Express.js
res.setHeader('Content-Type', 'application/pdf');
res.sendFile('document.pdf');

# Python (Flask)
return send_file('doc.pdf', mimetype='application/pdf')

# .htaccess (Apache)
AddType application/pdf .pdf
AddType image/avif .avif
AddType font/woff2 .woff2

Frequently Asked Questions

What is a MIME type?
MIME (Multipurpose Internet Mail Extensions) type is a standard label that identifies the format of a file. It consists of a type and subtype: 'application/pdf', 'image/png', 'video/mp4'. Web servers use MIME types in the Content-Type header to tell browsers how to handle files. Without correct MIME types, browsers may download files instead of displaying them, or block them entirely.
MIME type vs file extension — What is the difference?
File extensions (.pdf, .jpg) are part of the filename — they can be changed or faked. MIME types are metadata sent by the server in HTTP headers — they describe the actual content format. Security-conscious applications check both: the extension for user-facing display, and the MIME type (or magic bytes) for actual content validation. Our MIME database shows both for each format.
How to set Content-Type header correctly?
In Nginx: add_header Content-Type application/pdf. In Express.js: res.setHeader('Content-Type', 'image/png'). In Apache: AddType image/avif .avif. Most web frameworks auto-detect MIME types, but you should explicitly set them for: new formats (AVIF, WOFF2), file downloads (Content-Disposition: attachment), and API responses (application/json).
What are magic bytes?
Magic bytes (file signatures) are the first few bytes of a file that identify its format — regardless of the file extension. For example, JPEG files always start with FF D8 FF, PNG with 89 50 4E 47. Security tools use magic bytes to detect extension spoofing (e.g., a .pdf file that's actually a JPEG). Our table shows magic bytes for each format.
Why does my browser show 'application/octet-stream' instead of the correct type?
application/octet-stream is the default fallback MIME type — it means 'unknown binary data'. Your web server isn't configured with the correct MIME type for that file extension. Fix: add the correct AddType directive (Apache), types block (Nginx), or Content-Type header (code). Use our lookup table to find the correct MIME type for any extension.

Related reading