No Login Data Private Local Save

MIME Type ↔ Extension Lookup - Online Quick Reference

16
0
0
0
Type to search β€” supports MIME type and file extension lookup
All Text Image Audio Video Application Font Multipart Model Message
Showing 0 MIME types
MIME Type Extension(s) Category Description Copy
No matching MIME types found
Try a different search term or browse by category

Frequently Asked Questions

A MIME type (Multipurpose Internet Mail Extensions) is a standardized string that indicates the nature and format of a file or data being transmitted over the internet. It follows the format type/subtype β€” for example, text/html for HTML documents, image/png for PNG images, and application/json for JSON data. MIME types are used in HTTP headers (like Content-Type), email attachments, and operating systems to identify file formats.

A file extension (like .html, .png, .pdf) is part of a file's name and hints at its format, while a MIME type (like text/html) formally identifies the file's content type for data transmission. File extensions are used by operating systems to associate files with applications, while MIME types are used by web servers and browsers to properly handle content. One MIME type can correspond to multiple extensions (e.g., image/jpeg β†’ .jpg, .jpeg), and some extensions may map to different MIME types depending on context.

You can find a file's MIME type in several ways:
  • Browser DevTools: Open Network tab, click a request, and check the Content-Type response header.
  • Command line (Linux/macOS): Use file --mime-type filename to detect the MIME type.
  • Node.js: Use the mime package or file-type for detection.
  • This tool: Look up by file extension using the search above to find the standard MIME type.

The most frequently used MIME types in web development include:
  • text/html β€” HTML documents
  • text/css β€” Cascading Style Sheets
  • text/javascript or application/javascript β€” JavaScript files
  • application/json β€” JSON data
  • image/png, image/jpeg, image/webp, image/svg+xml β€” Common image formats
  • font/woff2, font/woff β€” Web fonts
  • application/pdf β€” PDF documents
  • application/xml β€” XML data
  • multipart/form-data β€” Form submissions with file uploads

Nginx: Edit mime.types or add types { ... } block in your config. Example: types { application/json json; }

Apache: Use AddType directive in .htaccess or config. Example: AddType application/json .json

Node.js/Express: The server automatically sets Content-Type based on the file extension, or use res.type('json') / res.set('Content-Type', 'application/json').

CDN / Cloud Storage: Most services auto-detect MIME types from file extensions, but you can often override them in settings or metadata.

When no specific MIME type is provided, the default is application/octet-stream. This generic binary type tells the browser or client that the data is an arbitrary binary file, and it should be downloaded rather than displayed inline. Web servers use this as a fallback for unknown file extensions. For security reasons, it's better to explicitly set correct MIME types rather than relying on the default.

Yes. Some file extensions can correspond to multiple MIME types depending on the specific format variant or historical usage. For example:
  • .xml can be text/xml or application/xml
  • .js can be text/javascript or application/javascript
  • .svg is typically image/svg+xml
  • .ts (TypeScript) uses video/mp2t for MPEG transport streams but also application/typescript in some contexts
This tool shows the most standard and widely-accepted MIME type for each extension.

In HTTP, MIME types are primarily used in two headers:
  • Content-Type (response): Tells the browser how to interpret the response body β€” whether to render it as HTML, display an image, play audio, or prompt a download.
  • Accept (request): The client tells the server which MIME types it can handle, enabling content negotiation (e.g., requesting JSON vs XML).
Proper MIME type configuration is crucial for security β€” serving JavaScript with an incorrect MIME type can cause it to be blocked by browsers' MIME type checking.

The standard MIME type for JSON is application/json. Historically, text/json was sometimes used, but application/json is the IANA-registered standard and should always be preferred. For JSON-LD, use application/ld+json. For JSON API (JSON:API spec), use application/vnd.api+json. Always set the charset=utf-8 parameter when serving JSON: application/json; charset=utf-8.

CSS: Use text/css. This is the IANA-registered MIME type for stylesheets.

JavaScript: The modern standard is text/javascript (IANA-registered). Historically, application/javascript, application/x-javascript, and text/x-javascript were used. For maximum compatibility, text/javascript is recommended. For ES modules (.mjs), use the same text/javascript MIME type β€” the module behavior is determined by the <script type="module"> HTML attribute, not the MIME type.