MIME Type Lookup

Web

Look up MIME types by file extension or vice versa for common formats (json, pdf, png). Set correct Content-Type headers and avoid broken downloads.

51 / 51
𝐓
.txttext/plain
𝐓
.htmltext/html
𝐓
.htmtext/html
𝐓
.csstext/css
.jsapplication/javascript
.mjsapplication/javascript
.jsonapplication/json
.xmlapplication/xml
𝐓
.csvtext/csv
.yamlapplication/yaml
.ymlapplication/yaml
𝐓
.mdtext/markdown
.rtfapplication/rtf
.pdfapplication/pdf
.zipapplication/zip
.gzapplication/gzip
.tarapplication/x-tar
.7zapplication/x-7z-compressed
.epubapplication/epub+zip
.jpgimage/jpeg
.jpegimage/jpeg
.pngimage/png
.gifimage/gif
.webpimage/webp
.svgimage/svg+xml
.icoimage/x-icon
.bmpimage/bmp
.avifimage/avif
.mp3audio/mpeg
.wavaudio/wav
.flacaudio/flac
.oggaudio/ogg
.aacaudio/aac
.m4aaudio/mp4
.mp4video/mp4
.webmvideo/webm
.movvideo/quicktime
.avivideo/x-msvideo
.mkvvideo/x-matroska
A
.wofffont/woff
A
.woff2font/woff2
A
.ttffont/ttf
A
.otffont/otf
.eotapplication/vnd.ms-fontobject
.docapplication/msword
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
.xlsapplication/vnd.ms-excel
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.pptapplication/vnd.ms-powerpoint
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
.wasmapplication/wasm

About MIME Type Lookup

A MIME type (media type) is the standard string describing a file's content format, such as text/html, image/png, or application/json, which a server sends in the Content-Type header to tell the browser how to handle the response. This tool offers two-way lookup between file extensions and MIME types: enter .webp to find image/webp, or look up application/pdf to find common extensions, with notes on whether it is binary and whether a charset is advised. The lookup tables are built into the page and queried locally, with no network requests. Tip: Bookmark this tool for quick access during your web development work. All processing happens locally in your browser with no installation required.

How to Use

  1. Open the MIME Type Lookup tool page
  2. Enter or paste your data into the input area
  3. View the real-time results and use the copy button to get the output

Use Cases

  • Static server config — Complete mime.types maps for Nginx or Apache so files are not served as text/plain.
  • Download headers — Find the right Content-Type when serving files so browsers preview or download correctly.
  • Upload validation — Check that the frontend accept attribute matches the backend allowed MIME list.
  • Render debugging — When JS or CSS fails, confirm the server returns a spec-compliant type.
  • API negotiation — Pick the correct type string for Accept, like application/vnd.api+json.
  • S3 bucket config — Look up the correct Content-Type per file extension when setting up an S3 static site or CDN.
  • HTTP header debugging — Check whether a server's Content-Type header matches the expected MIME for a given resource.

FAQ

What if Content-Type is wrong?

Browsers may refuse to run scripts (ES Modules require text/javascript) or render a page as plain text. With X-Content-Type-Options: nosniff, they strictly honor the declared type.

Is each extension tied to one MIME?

Not always. For example .js historically used text/javascript and application/javascript; the spec now recommends text/javascript. Similarly .xml has both text/xml and application/xml.

When do I add charset?

For text/* and some text-based types, append ;charset=utf-8 to declare encoding and avoid garbled characters; binary types like image/png do not need it.

How to detect type for files without extensions?

You can read the file header magic number, but this tool queries by extension and type table. Runtime detection needs content sniffing via a server or library.

What is application/octet-stream?

It is the generic "unknown binary stream" type, which browsers typically download directly. Use it to force a download of an arbitrary file instead of previewing.

Any browser compatibility requirements?

This tool works in all modern browsers (Chrome, Firefox, Edge, Safari). No plugins or extensions required.

Can I use it offline?

After initial load, most features work offline. The core logic runs entirely in your browser with no network dependency.

Advertisement

Comments

No comments yet. Be the first!

Comments are stored locally in your browser. Configure Giscus for cloud-based comments.