MIME Type Lookup
Resolve file extensions to MIME types or look up file extensions associated with specific MIME types.
HyperText Markup Language (HTML)
Content-TypeHyperText Markup Language (HTML)
Content-TypeCascading Style Sheets (CSS)
Content-TypeJavaScript (ECMAScript)
Content-TypeJavaScript ES Module
Content-TypePlain Text
Content-TypeComma-Separated Values (CSV)
Content-TypeMarkdown documentation file
Content-TypeExtensible Markup Language (XML)
Content-TypeJavaScript Object Notation (JSON)
Content-TypeJSON-LD (Linked Data)
Content-TypeAdobe Portable Document Format (PDF)
Content-TypeZIP Archive
Content-TypeTape Archive (TAR)
Content-TypeRAR Archive
Content-Type7-Zip Compressed Archive
Content-TypePortable Network Graphics (PNG)
Content-TypeJoint Photographic Experts Group (JPEG)
Content-TypeJoint Photographic Experts Group (JPEG)
Content-TypeGraphics Interchange Format (GIF)
Content-TypeScalable Vector Graphics (SVG)
Content-TypeWeb Picture Format (WebP)
Content-TypeMicrosoft Icon (ICO)
Content-TypeMP3 Audio
Content-TypeWaveform Audio Format (WAV)
Content-TypeOgg Audio
Content-TypeWebM Audio
Content-TypeMP4 Video
Content-TypeMPEG Video
Content-TypeWebM Video
Content-TypeOgg Video
Content-TypeWeb Open Font Format (WOFF)
Content-TypeWeb Open Font Format 2.0 (WOFF2)
Content-TypeTrueType Font
Content-TypeOpenType Font
Content-TypeYAML Ain't Markup Language
Content-TypeYAML Ain't Markup Language
Content-TypeMicrosoft Excel Spreadsheet
Content-TypeMicrosoft Word Document
Content-TypeMicrosoft PowerPoint Presentation
Content-TypeElectronic Publication (EPUB)
Content-TypeBourne Shell Script
Content-TypeWebAssembly Binary
Content-TypeMatch file suffixes with Internet media types
A media type describes the format of a representation, usually as type/subtype, for example image/png or application/json. The older name MIME type remains common because the syntax began with Multipurpose Internet Mail Extensions and later became fundamental to HTTP, browsers, APIs, uploads, and email.
This MIME type lookup searches a built-in table of familiar web formats. It can match an extension, a media type, or descriptive text, then copy either the media type or dotted extension. Everything happens locally in the React component. No filename, query, or selection is fetched from a server.
Use the result as a quick configuration reference, not as file-content detection or an exhaustive registry. The table has a curated set of text, image, audio, video, application, and font entries. It cannot inspect bytes, validate a file, or guarantee what a particular operating system, server, framework, or browser has configured.
Search modes and exact behavior
All Types searches extension, media type, and description. Entering json can match .json, .jsonld, application/json, and descriptive text. By Extension searches only extension strings. A leading dot is removed from the query, so .png and png behave alike. By MIME Type searches only media-type strings, making image/ a convenient way to narrow the image family.
Matching is case-insensitive and uses substring containment rather than exact equality. Searching ml could match more than a strict extension lookup would. Switching modes clears the current search. An empty query shows the entire bundled catalog.
Each card shows extension, category, media type, and description. The upper copy control writes the media type; Copy Ext writes the dot-prefixed extension. Clipboard access may require a secure browser context and user permission. A copy restriction does not affect search.
Understand Content-Type
HTTP uses the Content-Type response header to identify the representation being transferred:
Content-Type: text/html; charset=utf-8
For requests with bodies, Content-Type tells the server how to parse the payload:
Content-Type: application/json
The top-level type is broad, such as text, image, audio, video, font, or application. The subtype identifies a format. A structured syntax suffix such as +json or +xml signals a representation based on JSON or XML while retaining application-specific semantics; application/ld+json is one example included in this lookup.
Parameters follow semicolons. Text often includes charset=utf-8, while multipart boundaries identify separators. Parameters are part of the field value but are not represented in this catalog. Copying text/html gives the base media type, not a complete header tailored to a response.
Accept points in the opposite direction: a client uses it to advertise media types it can handle. A server may answer 406 Not Acceptable when it cannot produce an acceptable representation. An API can reject a request’s Content-Type with 415 Unsupported Media Type. Confusing Accept with Content-Type is a common integration error.
Extension mapping is a hint, not proof
A .jpg extension commonly maps to image/jpeg, and .json commonly maps to application/json. But extensions are naming conventions. A file can be renamed incorrectly, uploaded maliciously, or generated with unexpected contents. Servers often choose Content-Type from configuration or an extension database without inspecting bytes.
For security-sensitive uploads, check more than the suffix and client-provided MIME value. Parse the file with a constrained format-aware library, enforce size and complexity limits, generate safe storage names, store outside executable paths, and serve downloads with deliberate headers. “Magic byte” checks help but are not complete: polyglot files and parser discrepancies can satisfy more than one interpretation.
Browsers may perform MIME sniffing in some contexts. X-Content-Type-Options: nosniff tells supporting browsers to honor declared types for relevant resources, reducing dangerous reinterpretation. That control makes correct server metadata more important. It is not a substitute for safe upload handling.
Configuration examples that need correct types
JavaScript modules
The lookup maps .js and .mjs to text/javascript. A server sending a module as text/plain or application/octet-stream can trigger strict MIME errors in browsers. Correct the origin or static-host mapping rather than disabling protections. Historical labels such as application/javascript remain visible in existing systems, but modern standards and browser guidance favor text/javascript.
WebAssembly
Serve .wasm as application/wasm. Correct typing enables efficient streaming compilation paths where supported. Sending it as a generic binary type may force fallback behavior or fail integration assumptions.
Fonts and CORS
WOFF and WOFF2 use font/woff and font/woff2. Correct MIME metadata does not solve cross-origin font restrictions: a font CDN may also need appropriate CORS response headers. Diagnose the actual browser console message rather than changing Content-Type at random.
SVG
.svg maps to image/svg+xml. Unlike simple raster images, SVG can contain active or referential features depending on context. Treat untrusted SVG as potentially dangerous, sanitize with a suitable policy, and consider serving user uploads from an isolated origin with restrictive headers.
Downloads
application/octet-stream is a generic binary type and is not listed as a particular extension in the current data set. It can encourage download handling, but Content-Disposition: attachment; filename="report.pdf" is the clearer tool for download intent. A PDF’s specific type remains application/pdf.
A realistic 415 investigation
Suppose an API client sends:
POST /v1/events HTTP/1.1
Content-Type: text/plain
{"event":"deploy"}
The body looks like JSON, but the declared request media type is plain text. An API expecting JSON can correctly return 415 Unsupported Media Type. Change the header to application/json and ensure the body is valid JSON encoded as expected.
If the endpoint expects a vendor type such as application/vnd.example.event+json, plain application/json may still be rejected. This lookup cannot know private or vendor contracts. Read the API specification, including required parameters and versioning.
For multipart/form-data, never manually invent a boundary that differs from the serialized body. Browser FormData normally sets a matching Content-Type boundary automatically. The catalog intentionally focuses on file and representation mappings rather than multipart construction.
A realistic static-file failure
A CSS file loads with a console message that its MIME type is text/html. Inspect the response body and status. Often a missing asset path was rewritten to an HTML application shell or login page. Adding a CSS media type for the route masks the routing error; restore the file path, authentication behavior, or fallback rules first.
Likewise, a JavaScript request returning HTML may have followed a redirect. Inspect the Network panel’s status and redirect chain. The extension in the original URL does not guarantee the final representation.
Categories and catalog boundaries
The interface’s category badges are organizational, not protocol rules. XML is categorized as Application because the table uses application/xml; XML can also have other registered types. Markdown appears as text/markdown. YAML is represented as application/yaml, but deployed systems may use historical or vendor-specific values. Interoperability depends on the consumers you must support.
The table includes common Open XML document types with long application/vnd.openxmlformats-officedocument... subtypes. Copying is useful because these values are error-prone to type. It also includes archives, media, fonts, shell scripts, and WebAssembly, but not every registered type or extension alias.
The authoritative landscape evolves. Standards bodies and the IANA Media Types registry should resolve disputes. Operating-system MIME databases, Apache or Nginx maps, language packages, and cloud object metadata may lag or disagree. Test the actual client behavior after changing configuration.
Privacy and browser constraints
Search data stays in component state and filters the in-memory MIME_DATA array. The component contains no fetch or remote detection service. It does not read local files, even if a search resembles a filename. No file picker, drag-and-drop handler, magic-number inspection, or upload occurs.
Clipboard buttons call navigator.clipboard.writeText. Browsers can deny that operation outside HTTPS, in embedded frames, or under permissions policy. Select and copy the visible text manually if needed.
Because detection is not performed, the tool cannot reveal malware, encoding, compression, media codecs, corruption, or whether a representation conforms to its declared type. It also cannot configure your server automatically.
Troubleshooting the lookup itself
If no cards match, switch to All Types and shorten the query. Remove parameters such as ; charset=utf-8, because entries store base types only. Remember that changing tabs clears text. Search .jpeg or jpeg, not a complete path.
If a known type is missing, the curated array may not contain it. Verify the registered value rather than choosing the nearest card. If multiple extensions share a type, such as .jpg and .jpeg, the UI shows separate cards. If one extension can legitimately map to several types in your ecosystem, the list may show only its chosen conventional mapping.
MIME questions from day-to-day development
Is MIME type the same as file extension?
No. The extension is part of a name; the media type is metadata describing a representation. They often correlate but can disagree.
Can I trust File.type in browser uploads?
Treat it as a convenience hint. It is commonly derived from the client environment and may be empty or spoofed. Validate on the server.
Should JSON use a charset parameter?
JSON interoperates as UTF-8 in modern HTTP usage. Many systems accept application/json; charset=utf-8, but follow the applicable API contract and current specification.
Why does .xml use application/xml rather than text/xml?
Both have existed, but application/xml is generally suitable when generic text presentation is not the intended fallback. More specific +xml types can express domain semantics.
Does nosniff block all content sniffing?
No. Its effects are context- and browser-dependent. Use correct types, safe serving origins, download controls, and robust content validation as a system.
Is this list complete enough for server configuration?
It is a practical quick reference, not a complete generated MIME database. Use maintained platform data and the IANA registry for production-wide mappings.