image/webp- Extensions
- .webp
- Compressible
- Probably no — media formats are usually compressed (not set in mime-db)
- In the browser
- Shown in the browser
- Header
- Content-Type: image/webp
DEV SECTOR
Find the MIME type of any file extension, or the extensions of any type — and detect a file’s real format.
1,046 media types and 1,239 extensions from mime-db 1.54.0 (MIT).
image/webpThe extension in a file name is only a label. Drop files here to read their magic bytes — the signature at the start of the file — and compare the real format with the extension.
Lookups and file checks run entirely in your browser. Only the first and last 64 KB of each file (plus a ZIP’s file list) are read, and nothing is uploaded.
This MIME type lookup converts in both directions: type an extension such as .webp or a file name and you get its media type (image/webp); type a media type such as application/json and you get its extensions. Each result shows whether the type is registered with IANA, which older or unofficial names point to it, whether browsers display it or download it, whether it is worth compressing, and the exact Content-Type header to send.
The second half of the page answers a different question: what is this file really? Drop any file and the tool reads its magic bytes — the signature at the start of most formats — to identify the true format, then warns you when the extension does not match. That catches photos renamed from .heic to .jpg, “PDFs” that are really Windows programs, and Office files hiding macros. Files never leave your device.
More than a thousand media types from mime-db 1.54.0 (MIT licence), the database used by the Node.js ecosystem, which combines the IANA registry with Apache and nginx lists.
About fifty common wrong or legacy names — image/jpg, audio/mp3, application/x-javascript, application/x-zip-compressed — map to the type you should use, citing the RFC.
Recognises more than 100 formats: images, audio, video, fonts, archives, Office and OpenDocument files, e-books, executables, databases, disk images and text formats.
DOCX, XLSX, PPTX, EPUB, ODF, JAR and APK are told apart by reading the ZIP’s file list, and macro-enabled Office files are flagged.
Only the first and last 64 KB of each file are read, so even multi-gigabyte videos are checked instantly — and nothing is uploaded.
| Extension | MIME type | Notes |
|---|---|---|
| .html | text/html | Add “; charset=utf-8” |
| .js, .mjs | text/javascript | The only recommended JavaScript type since RFC 9239 |
| .json | application/json | No charset parameter needed — JSON is UTF-8 |
| .jpg, .jpeg | image/jpeg | Never image/jpg |
| .webp / .avif | image/webp / image/avif | Both now IANA-registered |
| .svg | image/svg+xml | Without “+xml” browsers will not render it |
| .mp4 | video/mp4 | audio/mp4 for audio-only .m4a |
| .woff2 | font/woff2 | The font/ top-level type comes from RFC 8081 |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | A ZIP container underneath |
| unknown | application/octet-stream | Tells browsers to download the file |
Browsers decide what to do with a response from its Content-Type header, not from the extension in the URL. Serve a stylesheet as text/plain and, with the X-Content-Type-Options: nosniff header that most sites send, the browser refuses to apply it; serve JavaScript with the wrong type and modules will not load. Uploads work the other way round: the browser guesses the type from the file name, so an upload form should check the content itself — exactly what the magic-byte checker on this page demonstrates.
Text-based types such as HTML, CSS, JavaScript, JSON, SVG and XML often shrink to a fraction of their size with gzip or Brotli. JPEG, PNG, WebP, MP4, MP3, WOFF2 and ZIP are already compressed, so compressing them again wastes CPU time. To see the headers a live URL actually returns, use the HTTP Status Checker; to confirm a download has not been altered, compare its checksum with the File Hash Checker.
Some formats share a container, so the signature alone cannot always settle the question. An MP4 file may hold only audio; a ZIP may be any of dozens of formats; and plain text has no signature at all, so CSV, Markdown and source code all read as text. The tool reports what the bytes prove and says when it cannot be sure. Extracting the contents of an archive is a separate job for the ZIP Extractor.
application/vnd.openxmlformats-officedocument.wordprocessingml.document. Excel .xlsx files are application/vnd.openxmlformats-officedocument.spreadsheetml.sheet and PowerPoint .pptx files are application/vnd.openxmlformats-officedocument.presentationml.presentation.
image/jpeg. image/jpg was never registered; browsers tolerate it, but servers and APIs should always send image/jpeg for .jpg and .jpeg files.
text/javascript. RFC 9239 (2022) made it the one recommended type and marked application/javascript, application/x-javascript and the ecmascript types obsolete.
Drop it on the checker in this MIME type lookup. It reads the signature bytes at the start of the file — for example 89 50 4E 47 for PNG or %PDF- for PDF — and compares the real format with the extension.
Either the server sends a type the browser cannot display, such as application/octet-stream, or it adds a Content-Disposition: attachment header. Check the type in the card’s “In the browser” row.
No. The file is read with the browser’s File API on your own device — just the first and last 64 KB, plus a ZIP file’s directory — and nothing is sent to any server.