Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

MIME Type Lookup (File Extension to Content Type)

Look up MIME types by extension and detect file types from magic bytes.

475 types

ExtensionMIME type
.htmltext/html
.htmtext/html
.shtmltext/html
.xhtmlapplication/xhtml+xml
.csstext/css
.jstext/javascript
.mjstext/javascript
.cjstext/javascript
.jsxtext/jsx
.tsvideo/mp2t
.tsxtext/tsx
.jsonapplication/json
.jsonldapplication/ld+json
.mapapplication/json
.webmanifestapplication/manifest+json
.geojsonapplication/geo+json
.topojsonapplication/json
.harapplication/json
.ndjsonapplication/x-ndjson
.jsonlapplication/jsonl
.json5application/json5
.xmlapplication/xml
.xslapplication/xslt+xml
.xsltapplication/xslt+xml
.xsdapplication/xml
.dtdapplication/xml-dtd
.rssapplication/rss+xml
.atomapplication/atom+xml
.rdfapplication/rdf+xml
.opmltext/x-opml
.kmlapplication/vnd.google-earth.kml+xml
.kmzapplication/vnd.google-earth.kmz
.gpxapplication/gpx+xml
.txttext/plain
.texttext/plain
.logtext/plain
.conftext/plain
.cfgtext/plain
.initext/plain
.envtext/plain
.propertiestext/x-java-properties
.tomlapplication/toml
.yamlapplication/yaml
.ymlapplication/yaml
.csvtext/csv
.tsvtext/tab-separated-values
.mdtext/markdown
.markdowntext/markdown
.rsttext/x-rst
.adoctext/asciidoc
.texapplication/x-tex
.latexapplication/x-latex
.bibtext/x-bibtex
.rtfapplication/rtf
.icstext/calendar
.ifbtext/calendar
.vcftext/vcard
.vcardtext/vcard
.srtapplication/x-subrip
.vtttext/vtt
.asstext/x-ssa
.subtext/vnd.dvb.subtitle
.difftext/x-diff
.patchtext/x-diff
.shapplication/x-sh
.bashapplication/x-sh
.zshtext/x-shellscript
.batapplication/x-msdos-program
.cmdapplication/x-msdos-program
.ps1text/plain
.pytext/x-python
.pycapplication/x-python-code
.rbtext/x-ruby
.phpapplication/x-httpd-php
.pltext/x-perl
.pmtext/x-perl
.luatext/x-lua
.javatext/x-java-source
.classapplication/java-vm
.jarapplication/java-archive
.warapplication/java-archive
.earapplication/java-archive
.jnlpapplication/x-java-jnlp-file
.kttext/x-kotlin
.ktstext/x-kotlin
.scalatext/x-scala
.groovytext/x-groovy
.gradletext/x-groovy
.gotext/x-go
.rstext/rust
.ctext/x-c
.htext/x-c
.cctext/x-c
.cpptext/x-c
.cxxtext/x-c
.hpptext/x-c
.hhtext/x-c
.mtext/x-objcsrc
.mmtext/x-objcsrc
.swifttext/x-swift
.cstext/x-csharp
.vbtext/x-vb
.fstext/x-fsharp
.dartapplication/vnd.dart
.rtext/x-r
.jltext/x-julia
.hstext/x-haskell
.extext/x-elixir
.exstext/x-elixir
.erltext/x-erlang
.cljtext/x-clojure
.lisptext/x-common-lisp
.scmtext/x-scheme
.mltext/x-ocaml
.pastext/x-pascal
.asmtext/x-asm
.stext/x-asm
.f90text/x-fortran
.fortext/x-fortran
.sqlapplication/sql
.graphqlapplication/graphql+json
.gqlapplication/graphql+json
.prototext/x-protobuf
.vuetext/x-vue
.sveltetext/x-svelte
.scsstext/x-scss
.sasstext/x-sass
.lesstext/less
.styltext/x-styl
.coffeetext/coffeescript
.hbstext/x-handlebars-template
.mustachetext/x-mustache
.ejstext/x-ejs
.pugtext/x-pug
.twigtext/x-twig
.jspapplication/jsp
.asptext/asp
.aspxtext/asp
.cshtmltext/x-cshtml
.wasmapplication/wasm
.wattext/plain
.htctext/x-component
.appcachetext/cache-manifest
.manifesttext/cache-manifest
.mftext/plain
.locktext/plain
.dockerfiletext/plain
.makefiletext/x-makefile
.cmaketext/x-cmake
.pngimage/png
.apngimage/apng
.jpgimage/jpeg
.jpegimage/jpeg
.jpeimage/jpeg
.jfifimage/jpeg
.pjpegimage/jpeg
.gifimage/gif
.webpimage/webp
.avifimage/avif
.heicimage/heic
.heifimage/heif
.jxlimage/jxl
.jp2image/jp2
.jpximage/jpx
.j2kimage/jp2
.svgimage/svg+xml
.svgzimage/svg+xml
.icoimage/vnd.microsoft.icon
.curimage/x-icon
.bmpimage/bmp
.dibimage/bmp
.tifimage/tiff
.tiffimage/tiff
.psdimage/vnd.adobe.photoshop
.xcfimage/x-xcf
.aiapplication/postscript
.epsapplication/postscript
.psapplication/postscript
.dngimage/x-adobe-dng
.cr2image/x-canon-cr2
.cr3image/x-canon-cr3
.nefimage/x-nikon-nef
.arwimage/x-sony-arw
.orfimage/x-olympus-orf
.rafimage/x-fuji-raf
.rw2image/x-panasonic-rw2
.tgaimage/x-tga
.pcximage/x-pcx
.ppmimage/x-portable-pixmap
.pgmimage/x-portable-graymap
.pbmimage/x-portable-bitmap
.pnmimage/x-portable-anymap
.xbmimage/x-xbitmap
.xpmimage/x-xpixmap
.exrimage/x-exr
.hdrimage/vnd.radiance
.ddsimage/vnd.ms-dds
.ktximage/ktx
.ktx2image/ktx2
.emfimage/emf
.wmfimage/wmf
.djvuimage/vnd.djvu
.djvimage/vnd.djvu
.mp3audio/mpeg
.m4aaudio/mp4
.m4baudio/mp4
.m4raudio/mp4
.aacaudio/aac
.adtsaudio/aac
.ogaaudio/ogg
.oggaudio/ogg
.opusaudio/ogg
.spxaudio/ogg
.flacaudio/flac
.wavaudio/wav
.waveaudio/wav
.aifaudio/aiff
.aiffaudio/aiff
.aifcaudio/aiff
.auaudio/basic
.sndaudio/basic
.midaudio/midi
.midiaudio/midi
.karaudio/midi
.webaaudio/webm
.wmaaudio/x-ms-wma
.amraudio/amr
.awbaudio/amr-wb
.3gaaudio/3gpp
.cafaudio/x-caf
.raaudio/x-realaudio
.ramaudio/x-pn-realaudio
.mkaaudio/x-matroska
.ac3audio/ac3
.dtsaudio/vnd.dts
.mpgaaudio/mpeg
.m3uaudio/x-mpegurl
.m3u8application/vnd.apple.mpegurl
.plsaudio/x-scpls
.mp4video/mp4
.m4vvideo/x-m4v
.mp4vvideo/mp4
.mpg4video/mp4
.movvideo/quicktime
.qtvideo/quicktime
.webmvideo/webm
.mkvvideo/x-matroska
.mk3dvideo/x-matroska
.avivideo/x-msvideo
.wmvvideo/x-ms-wmv
.asfvideo/x-ms-asf
.flvvideo/x-flv
.f4vvideo/mp4
.ogvvideo/ogg
.mpegvideo/mpeg
.mpgvideo/mpeg
.mpevideo/mpeg
.m1vvideo/mpeg
.m2vvideo/mpeg
.mtsvideo/mp2t
.m2tsvideo/mp2t
.3gpvideo/3gpp
.3g2video/3gpp2
.h264video/h264
.h265video/h265
.ivfvideo/x-ivf
.mxfapplication/mxf
.vobvideo/x-ms-vob
.mpdapplication/dash+xml
.wofffont/woff
.woff2font/woff2
.ttffont/ttf
.otffont/otf
.ttcfont/collection
.eotapplication/vnd.ms-fontobject
.pfbapplication/x-font-type1
.pdfapplication/pdf
.epubapplication/epub+zip
.mobiapplication/x-mobipocket-ebook
.azwapplication/vnd.amazon.ebook
.azw3application/vnd.amazon.mobi8-ebook
.fb2application/x-fictionbook+xml
.cbzapplication/vnd.comicbook+zip
.cbrapplication/vnd.comicbook-rar
.xpsapplication/vnd.ms-xpsdocument
.oxpsapplication/oxps
.docapplication/msword
.dotapplication/msword
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotxapplication/vnd.openxmlformats-officedocument.wordprocessingml.template
.docmapplication/vnd.ms-word.document.macroEnabled.12
.xlsapplication/vnd.ms-excel
.xltapplication/vnd.ms-excel
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltxapplication/vnd.openxmlformats-officedocument.spreadsheetml.template
.xlsmapplication/vnd.ms-excel.sheet.macroEnabled.12
.xlsbapplication/vnd.ms-excel.sheet.binary.macroEnabled.12
.pptapplication/vnd.ms-powerpoint
.ppsapplication/vnd.ms-powerpoint
.potapplication/vnd.ms-powerpoint
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
.ppsxapplication/vnd.openxmlformats-officedocument.presentationml.slideshow
.potxapplication/vnd.openxmlformats-officedocument.presentationml.template
.pptmapplication/vnd.ms-powerpoint.presentation.macroEnabled.12
.vsdapplication/vnd.visio
.vsdxapplication/vnd.ms-visio.drawing
.mppapplication/vnd.ms-project
.oneapplication/onenote
.msgapplication/vnd.ms-outlook
.pstapplication/vnd.ms-outlook
.pubapplication/x-mspublisher
.mdbapplication/x-msaccess
.accdbapplication/msaccess
.odtapplication/vnd.oasis.opendocument.text
.ottapplication/vnd.oasis.opendocument.text-template
.odsapplication/vnd.oasis.opendocument.spreadsheet
.otsapplication/vnd.oasis.opendocument.spreadsheet-template
.odpapplication/vnd.oasis.opendocument.presentation
.otpapplication/vnd.oasis.opendocument.presentation-template
.odgapplication/vnd.oasis.opendocument.graphics
.odfapplication/vnd.oasis.opendocument.formula
.odbapplication/vnd.oasis.opendocument.database
.pagesapplication/vnd.apple.pages
.numbersapplication/vnd.apple.numbers
.keyapplication/vnd.apple.keynote
.wpdapplication/vnd.wordperfect
.abwapplication/x-abiword
.zipapplication/zip
.gzapplication/gzip
.tgzapplication/gzip
.bz2application/x-bzip2
.bzapplication/x-bzip
.xzapplication/x-xz
.lzapplication/x-lzip
.lzmaapplication/x-lzma
.lz4application/x-lz4
.zstapplication/zstd
.brapplication/x-brotli
.zapplication/x-compress
.7zapplication/x-7z-compressed
.rarapplication/vnd.rar
.tarapplication/x-tar
.cpioapplication/x-cpio
.arapplication/x-archive
.cabapplication/vnd.ms-cab-compressed
.arjapplication/x-arj
.lzhapplication/x-lzh-compressed
.aceapplication/x-ace-compressed
.sitapplication/x-stuffit
.sitxapplication/x-stuffitx
.isoapplication/x-iso9660-image
.imgapplication/octet-stream
.dmgapplication/x-apple-diskimage
.vhdapplication/x-vhd
.vhdxapplication/x-vhdx
.vmdkapplication/x-vmdk
.qcow2application/x-qemu-disk
.ovaapplication/x-virtualbox-ova
.exeapplication/vnd.microsoft.portable-executable
.dllapplication/vnd.microsoft.portable-executable
.sysapplication/octet-stream
.msiapplication/x-msi
.msixapplication/msix
.appxapplication/appx
.apkapplication/vnd.android.package-archive
.xapkapplication/vnd.android.package-archive
.ipaapplication/octet-stream
.debapplication/vnd.debian.binary-package
.rpmapplication/x-rpm
.snapapplication/vnd.snap
.flatpakapplication/vnd.flatpak
.appimageapplication/vnd.appimage
.pkgapplication/octet-stream
.binapplication/octet-stream
.datapplication/octet-stream
.soapplication/octet-stream
.oapplication/x-object
.aapplication/x-archive
.elfapplication/x-elf
.dylibapplication/x-mach-binary
.swfapplication/x-shockwave-flash
.crxapplication/x-chrome-extension
.xpiapplication/x-xpinstall
.vsixapplication/vsix
.nupkgapplication/zip
.whlapplication/zip
.eggapplication/zip
.gemapplication/x-tar
.torrentapplication/x-bittorrent
.sqliteapplication/vnd.sqlite3
.sqlite3application/vnd.sqlite3
.dbapplication/vnd.sqlite3
.parquetapplication/vnd.apache.parquet
.avroapplication/avro
.arrowapplication/vnd.apache.arrow.file
.featherapplication/vnd.apache.arrow.file
.orcapplication/octet-stream
.hdf5application/x-hdf5
.h5application/x-hdf5
.ncapplication/x-netcdf
.npyapplication/octet-stream
.npzapplication/zip
.pklapplication/octet-stream
.matapplication/x-matlab-data
.savapplication/x-spss-sav
.dtaapplication/x-stata-dta
.rdataapplication/octet-stream
.ipynbapplication/x-ipynb+json
.pemapplication/x-pem-file
.crtapplication/x-x509-ca-cert
.cerapplication/pkix-cert
.derapplication/x-x509-ca-cert
.csrapplication/pkcs10
.p10application/pkcs10
.p7bapplication/x-pkcs7-certificates
.p7capplication/pkcs7-mime
.p7mapplication/pkcs7-mime
.p7sapplication/pkcs7-signature
.p12application/x-pkcs12
.pfxapplication/x-pkcs12
.crlapplication/pkix-crl
.ascapplication/pgp-signature
.sigapplication/pgp-signature
.gpgapplication/pgp-encrypted
.pgpapplication/pgp-encrypted
.jwkapplication/jwk+json
.jwksapplication/jwk-set+json
.emlmessage/rfc822
.mboxapplication/mbox
.mhtmultipart/related
.mhtmlmultipart/related
.urltext/x-uri
.weblocapplication/x-webloc
.desktopapplication/x-desktop
.lnkapplication/x-ms-shortcut
.regtext/x-ms-regedit
.plistapplication/x-plist
.stringstext/plain
.potext/x-gettext-translation
.moapplication/x-gettext-translation
.xliffapplication/xliff+xml
.xlfapplication/xliff+xml
.resxapplication/xml
.glbmodel/gltf-binary
.gltfmodel/gltf+json
.objmodel/obj
.mtlmodel/mtl
.stlmodel/stl
.fbxapplication/octet-stream
.daemodel/vnd.collada+xml
.3mfmodel/3mf
.usdzmodel/vnd.usdz+zip
.plyapplication/ply
.wrlmodel/vrml
.x3dmodel/x3d+xml
.stepmodel/step
.stpmodel/step
.igesmodel/iges
.igsmodel/iges
.dwgimage/vnd.dwg
.dxfimage/vnd.dxf
.blendapplication/x-blender
.skpapplication/vnd.sketchup.skp
.xdapplication/vnd.adobe.xd
.inddapplication/x-indesign
.gcodetext/x-gcode
.shpapplication/x-esri-shape
.shxapplication/x-esri-shape
.dbfapplication/dbase
.prjtext/plain
.gpkgapplication/geopackage+sqlite3
.pbfapplication/x-protobuf
.mvtapplication/vnd.mapbox-vector-tile
.pmtilesapplication/vnd.pmtiles
.pacapplication/x-ns-proxy-autoconfig

Detect from file

The file is read on your device and never uploaded.

Use via API

Find the MIME type and Content-Type header for a file extension or filename, the extensions for a MIME type, or search the table. Optionally detect a file's real type from its first bytes (magic numbers). Send JSON, get JSON back.

POST https://pithlab.com/api/v1/tools/mime-type-lookup

curl https://pithlab.com/api/v1/tools/mime-type-lookup \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"photo.webp"}'

Fields and responseOpenAPI documentGet an API key

About the MIME Type Lookup

Find the MIME type for any file extension or the extensions for a MIME type, with charset and compression notes. Detect a file's real type from its bytes.

How to use the MIME Type Lookup

  1. Type a file extension (png), a file name (report.docx) or a MIME type (application/json).
  2. Read the best match at the top, then browse the table, which filters as you type.
  3. Use the Content-Type value shown, which includes charset=utf-8 for text types.
  4. To check what a file really is, choose it under Detect from file. Only its first and last bytes are read, on your device.

Examples

Extension to MIME type

Input

png

Output

.png: image/png
Text types get a charset

Input

styles.css

Output

.css: text/css; charset=utf-8
MIME type to extensions

Input

image/jpeg

Output

image/jpeg: .jpg, .jpeg, .jpe, .jfif, .pjpeg
Parameters are ignored

Input

application/json; charset=utf-8

Output

application/json: .json, .map, .topojson, .har

Frequently asked questions

What is a MIME type?

A MIME type (or media type) such as text/html or image/png tells browsers and other software what kind of data a file contains. Web servers send it in the Content-Type header.

What happens if a server sends the wrong MIME type?

Browsers may refuse to run scripts or stylesheets, show a download prompt instead of displaying a file, or show code as text. With X-Content-Type-Options: nosniff, browsers trust the header completely, so it must be right.

How does detecting from a file work?

Most formats start with a fixed signature, called magic bytes, such as %PDF- for PDF or 89 50 4E 47 for PNG. The tool reads the start and end of the file in your browser and compares them with about 40 known signatures. Nothing is uploaded.

Which types should be compressed?

Text formats such as HTML, CSS, JavaScript, JSON, SVG and XML shrink a lot with gzip or Brotli. Already compressed formats such as JPEG, PNG, MP4, WOFF2 and ZIP do not, so compressing them wastes CPU.

Why is a DOCX detected as a ZIP?

Office files are ZIP archives. The tool looks for the word/, xl/ or ppt/ folders inside to tell them apart. If those names are not in the bytes it reads, it falls back to ZIP.