Overview
Look up MIME types by file extension
A MIME type, also called a media type or content type, is a short label that tells software what kind of file it is dealing with. Examples include text/html for web pages, image/png for PNG images, and application/json for JSON data. Browsers, web servers, and email clients rely on these labels to decide whether to render, play, download, or reject a file.
ToolHub MIME Type Lookup is a fast reference covering about 80 common file extensions. Type an extension to find its MIME type, or type a MIME type to find which extensions use it. Click any result to copy it. Everything happens in your browser.
Step-by-step
How to look up a MIME type
- 1
Type an extension or MIME type
Enter something likepng,.json, or a partial MIME type such asimage/. The table filters as you type. - 2
Scan the matching rows
Each row pairs a file extension with its standard MIME type. Search works from either direction, so a query likevideo/surfaces every video format. - 3
Click to copy
Click an extension or a MIME type to copy it to your clipboard, ready to paste into a header, config file, or upload validator.
Background
Why MIME types matter
When a server sends a file, it includes a Content-Type header carrying the MIME type. The browser trusts that header to decide what to do. If a JSON API responds with text/html by mistake, the browser may try to render it as a page instead of parsing it as data. If a stylesheet is served as text/plain, the browser refuses to apply it.
Type and subtype structure
Every MIME type has a top-level type and a subtype joined by a slash, such as image/png. Common top-level types are text, image, audio, video, and application. Anything that is not plain human-readable text or media usually falls under application.
The catch-all binary type
When a file has no known type, servers fall back to application/octet-stream. This generic binary type tells the browser to download the file rather than try to display it, which is the safe default for unknown content.
Use cases
When to use a MIME type lookup
Setting server headers
Find the correct Content-Type value to send for static files in Nginx, Apache, or a CDN config.
Validating file uploads
Build an accept list for an upload form or an API endpoint that should only allow certain file types.
Configuring the accept attribute
Populate an HTML file input accept attribute with the right MIME types for the formats you want.
Debugging broken downloads
Confirm whether a file is being served with the type the browser expects when a download misbehaves.
Writing email attachments
Set the correct Content-Type on MIME parts when assembling email attachments programmatically.
Building data URIs
Grab the MIME type you need to construct a data URI for inlining an image or font.
Tips and best practices
- JavaScript files are now standardized as text/javascript. The older application/javascript still works but is deprecated.
- An extension is a hint, not a guarantee. Servers should detect type from content when security matters, since extensions can be faked.
- Office formats have long, exact MIME types. A .docx file is application/vnd.openxmlformats-officedocument.wordprocessingml.document, not application/msword.
- Use application/octet-stream when you want a browser to download a file instead of opening it.
- Some types carry parameters, like text/html; charset=utf-8. This table lists the base type so you can add a charset when needed.
Common questions
What is the difference between a MIME type and a media type?
They are the same thing. MIME stands for Multipurpose Internet Mail Extensions, the standard where these labels were first defined. The web standards now prefer the term media type, but most developers still say MIME type.
Why does my JavaScript have several possible types?
JavaScript has been served as text/javascript, application/javascript, and others over the years. The current recommendation is text/javascript, which is what this table shows.
Can one extension map to more than one MIME type?
Yes. For example .xml can be application/xml or text/xml depending on context. This reference lists the most widely recommended type for each extension.
What if my extension is not listed?
This table covers the most common roughly 80 formats. For an obscure format not shown, a safe default is application/octet-stream, which prompts a download.
100% private