Dev
Fake MIME Type Generator
Getting a Content-Type header wrong — serving a .svg as text/plain or a .woff2 without its font/ type — causes browsers to mishandle the file, often silently. Having the correct mapping at hand when you configure a server, write upload validation, or document an API prevents those silent failures. This tool generates between 1 and 16 file extension / MIME type pairings from a pool of 16 common types, sampling without replacement so you never see duplicates in a single output. The pool covers the types developers look up most often: JSON, HTML, CSS, JavaScript, common image formats (PNG, JPEG, GIF, SVG, WebP), PDF, ZIP, MP4, MP3, CSV, XML, and WOFF2. Each entry is formatted as .ext → type/subtype for easy reading. Use the output as a quick reference, paste the types into a server config, or feed them into upload validation logic. The mappings are accurate and match the IANA-registered types for each extension.
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Choose how many pairings you want.
- Click Generate to produce MIME types.
- Use them to set Content-Type headers.
- Reference the correct type per extension.
Use Cases
- •Configuring Content-Type headers
- •Testing upload validation
- •Learning common MIME types
- •Documenting file handling
- •Looking up an extension's type
Tips
- →Set the correct Content-Type for files.
- →The wrong type can break rendering.
- →Each extension maps to a real type.
- →Use it as a quick reference.
FAQ
are the mime type mappings accurate
Yes. Each extension is paired with its genuine IANA-registered MIME type — .json maps to application/json, .svg to image/svg+xml, .woff2 to font/woff2. The mappings are reliable for use in server configuration, Content-Type headers, and upload validation.
what file types are included in the pool
The pool has 16 entries: .json, .html, .css, .js, .png, .jpg, .gif, .svg, .pdf, .zip, .mp4, .mp3, .csv, .xml, .woff2, and .webp. The generator samples from this list without replacement, so you will not see duplicates within a single output.
why does the correct mime type matter for serving files
The browser uses the Content-Type header to decide how to handle a response — whether to render an HTML page, display an image, play audio, or prompt a download. Serving a file with the wrong type can cause it to download unexpectedly, fail to render, or in some cases trigger security warnings.
can I get more than 16 types in one output
No — the pool itself contains 16 entries and the generator samples without replacement, so the maximum is 16 unique pairings per run. If you need more types, they are not in the built-in pool and you will need to look them up in the IANA media types registry.
You might also like
Popular tools from other categories that share themes with this one.
Try these next
More free tools from other corners of the catalog, picked by shared themes.