Tools
MIME Types
The MIME types tool provides a searchable reference for mapping file extensions to their correct IANA media type strings and vice versa. You can look up what Content-Type header to send for a given file format, or identify which file type corresponds to an unfamiliar MIME string. It covers all common media types including text, image, audio, video, application, and multipart categories.
What are MIME Types?
MIME (Multipurpose Internet Mail Extensions) types, also called media types or content types, are standardized identifiers that describe the format of a file or data stream. They follow the format type/subtype (e.g., text/html, application/json, image/png). Web servers send a Content-Type header with every response so that browsers know how to handle the data. Incorrect or missing MIME types cause browsers to misrender content, fail downloads, or block scripts under strict CSP policies.
How does it work?
Search by file extension (e.g., .svg, .woff2) or by MIME string (e.g., application/vnd.ms-excel). The tool returns the canonical IANA type, common alternative types, the associated file extension(s), and notes on browser handling. It also shows whether the type is text or binary, which affects whether a Content-Encoding: gzip header can compress it. Results include copy buttons for quick insertion into server configurations.
Typical Use Cases
- Setting the correct Content-Type header in a web server or CDN configuration
- Identifying the file type of an HTTP response with an unfamiliar content-type
- Configuring MIME types in nginx, Apache, or IIS for custom file formats
- Validating file upload MIME types on the server side
Step-by-step Guide
- Step 1: Type a file extension (e.g., mp4) or MIME string (e.g., video/mp4) into the search field.
- Step 2: Review the canonical MIME type and any common alternatives.
- Step 3: Copy the MIME string for use in your server configuration or code.
- Step 4: Check the binary/text flag to decide whether to enable compression.
Example
Input
.svg
Output
image/svg+xml — text format, compressible with gzip
Tips & Notes
- SVG files should be served as image/svg+xml, not image/svg — the +xml suffix enables XML parsing in browsers.
- JSON files must be served as application/json, not text/json, for proper handling by JavaScript clients.
- Fonts (woff2) should be served as font/woff2 — older configurations may use application/font-woff2.
Frequently Asked Questions
What happens if I serve a file with the wrong MIME type?
Browsers use the Content-Type header to decide how to handle a response. A wrong type may cause the browser to display a file as text instead of rendering it, prompt an unintended download, or refuse to execute a script under strict Content Security Policies.
What is application/octet-stream?
application/octet-stream is the generic binary MIME type used when the exact type is unknown or unspecified. Browsers typically treat it as a file download rather than attempting to render it.
MIME Types
Convert MIME types to file extensions and vice versa — with a complete reference table covering over 100 file formats.
Open Tool