nicetool.dev logo

MIME Types

Search by extension or MIME type, or check a file on your computer.

Pick any file: its type is detected from the name and from its first bytes. The file is read locally and never uploaded.

ExtensionMIME type
.txt
text/plain

Plain text

.html, .htm
text/html

HTML

.css
text/css

CSS

.csv
text/csv

CSV

.md
text/markdown

Markdown

.xml
application/xml

XML

.ics
text/calendar

iCalendar

.js, .mjs
text/javascript

JavaScript

.json
application/json

JSON

.jsonld
application/ld+json

JSON-LD

.webmanifest
application/manifest+json

Web app manifest

.yaml, .yml
application/yaml

YAML

.wasm
application/wasm

WebAssembly

.sh
application/x-sh

Shell script

.png
image/png

PNG

.jpg, .jpeg
image/jpeg

JPEG

.gif
image/gif

GIF

.webp
image/webp

WebP

.avif
image/avif

AVIF

.svg
image/svg+xml

SVG

.ico
image/vnd.microsoft.icon

Icon

.bmp
image/bmp

Bitmap

.tif, .tiff
image/tiff

TIFF

.heic
image/heic

HEIC

.mp3
audio/mpeg

MP3

.wav
audio/wav

WAV

.ogg, .oga
audio/ogg

Ogg audio

.opus
audio/opus

Opus

.m4a
audio/mp4

AAC / M4A

.flac
audio/flac

FLAC

.weba
audio/webm

WebM audio

.mp4
video/mp4

MP4

.webm
video/webm

WebM

.ogv
video/ogg

Ogg video

.mov
video/quicktime

QuickTime

.avi
video/x-msvideo

AVI

.mkv
video/x-matroska

Matroska

.m3u8
application/vnd.apple.mpegurl

HLS playlist

.ts
video/mp2t

MPEG transport stream

.woff
font/woff

WOFF

.woff2
font/woff2

WOFF2

.ttf
font/ttf

TrueType

.otf
font/otf

OpenType

.pdf
application/pdf

PDF

.doc
application/msword

Word 97-2003

.docx
application/vnd.openxmlformats-officedocument.wordprocessingml.document

Word

.xls
application/vnd.ms-excel

Excel 97-2003

.xlsx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Excel

.ppt
application/vnd.ms-powerpoint

PowerPoint 97-2003

.pptx
application/vnd.openxmlformats-officedocument.presentationml.presentation

PowerPoint

.odt
application/vnd.oasis.opendocument.text

OpenDocument text

.ods
application/vnd.oasis.opendocument.spreadsheet

OpenDocument spreadsheet

.rtf
application/rtf

Rich Text

.epub
application/epub+zip

EPUB

.zip
application/zip

ZIP

.gz
application/gzip

Gzip

.tar
application/x-tar

Tar

.7z
application/x-7z-compressed

7-Zip

.rar
application/vnd.rar

RAR

.bz2
application/x-bzip2

Bzip2

.zst
application/zstd

Zstandard

.bin
application/octet-stream

Binary (generic)

.apk
application/vnd.android.package-archive

Android package

.exe
application/vnd.microsoft.portable-executable

Windows executable

.dmg
application/x-apple-diskimage

macOS disk image

.jar
application/java-archive

Java archive

(form)
application/x-www-form-urlencoded

HTML form data

(form)
multipart/form-data

File upload form

(stream)
text/event-stream

Server-Sent Events

What is a MIME type?

A MIME type, also called a media type or content type, is a label such as image/png or application/json that tells software what kind of data it is handling. Web servers send it in the Content-Type header, so the browser knows whether to render a page, play a video or download a file. It has two parts, a type (text, image, audio, video, font, application) and a subtype, sometimes with parameters like charset=utf-8. A wrong MIME type causes real bugs: scripts blocked by X-Content-Type-Options: nosniff, fonts that do not load, or files that download instead of opening.

Features

  • • About 70 common MIME types for web, media, fonts, office documents and archives
  • • Search by extension (.webp), type (image/) or format name
  • • One-click copy of each MIME type for headers, nginx or S3 configs
  • • Local file checker comparing the extension with the real signature (magic bytes)
  • • Category filters for images, audio, video, fonts, documents and more

Files stay on your device

The file checker only reads the first 32 bytes of the file in your browser. Nothing is uploaded to a server.

Local file check, no upload.

How to use the MIME Types

  1. 1

    Type an extension such as .webp, a type such as "font/" or a format name in the search box, or filter by category.

  2. 2

    Click the copy icon next to a MIME type to paste it into a Content-Type header, an nginx types block or an upload allow-list.

  3. 3

    To check a real file, pick it with Check a file: the tool compares the type guessed from the extension with the type read from the first bytes.

  4. 4

    If the two differ, treat the file with care: it may have been renamed, exported with the wrong extension or disguised.

Practical examples

Serving files correctly

Configure your server or CDN so .js is text/javascript, .woff2 is font/woff2 and .webmanifest is application/manifest+json. Wrong types break module scripts, fonts and PWA installs.

Validating uploads

Accept image/jpeg, image/png and image/webp for avatars, and check the magic bytes server side too: the Content-Type sent by the browser comes from the file name and can be faked.

API responses

Return application/json for JSON APIs, text/event-stream for Server-Sent Events and application/octet-stream with Content-Disposition: attachment for downloads.

Debugging a "download instead of open" bug

If a PDF downloads instead of opening in the browser, check the response is application/pdf and not application/octet-stream.

Frequently asked questions

What is the MIME type for JavaScript?+

text/javascript is the current standard (RFC 9239). application/javascript still works in browsers but is obsolete. Modules loaded with type="module" fail if the server sends a non-JavaScript type.

What should I use for unknown binary files?+

application/octet-stream means "arbitrary bytes". Browsers download it instead of trying to display it.

Can I trust the file extension or the browser type?+

No. Both come from the file name. Magic bytes are more reliable but text formats (CSV, JSON, SVG) have no signature, so validate the content itself as well.

Why is .ts listed as video?+

In MIME terms .ts is an MPEG transport stream used by HLS video. TypeScript files have no registered type; servers usually send them as text/plain or the build turns them into JavaScript first.