CoolCodeTHE FILE REFERENCE DESK

MIME CABINET

JSON Content-Type and charset parameter example

Look up a filename such as photo.jpg to find its media type, or open a file to check what its first bytes reveal.

Worked example · MIME Cabinet

What this example shows

This example separates a common JSON Content-Type declaration into its media type and supplied charset parameter.

application/json matches 1 reference entry. The parsed declaration identifies application/json.

The declaration is an illustrative string. Its media-type record comes from mime-db 1.54.0, captured on 23 November 2026.

Part of the declarationParsed value
Media typeapplication/json
Top-level typeapplication
Subtypejson
Supplied charset parameterutf-8

The parser reports the supplied charset parameter as written. JSON interchange uses UTF-8, and the application/json registration defines no charset parameter.

A valid-looking header does not prove that the response body contains valid JSON. This tool reads the declaration without fetching its URL.

Try it with your own input

  1. Edit the Content-Type value already filled in below.
  2. Choose Interpret header to separate its type, subtype and parameters.
  3. Use Look up to inspect the reference entry for another media type.

Edit the prefilled example · Open the main tool

Sources and related tools

Another worked example

Opening the local reference…

Local lookup · no upload

THE REFERENCE

Find the right label.

A media type, an extension, a filename or a keyword.

Select a record

THE DECLARATION

Unpack Content-Type.

Paste one HTTP header value to separate its type, suffix and parameters.

The declaration describes how a body should be interpreted. It does not verify the body’s bytes.

THE FIRST BYTES

Inspect a file’s clues.

Choose a file on this device. Its contents are read only on this device.

Only a bounded prefix is read. A signature match is an indicator, not a safety verdict or full format validation.

READ THE EVIDENCE IN CONTEXT

Three clues.
Room for disagreement.

A reference, not a registry verdict

The bundled mime-db maps media types to known extensions and records IANA, Apache or nginx provenance when available. Multiple types can share an extension. Its compressibility flag describes typical content, not an HTTP Content-Encoding already applied.

Dataset edition · MIT licence

A bounded header inspection

The first bytes are compared with a small, documented collection of format patterns. ZIP, Ogg and ISO media containers can hold several formats. Archives are not extracted, content is not executed, and unknown signatures stay unknown.

A file can be damaged, truncated, misleading or contain additional content despite a matching header. This is not a malware scanner.

Keep the original local

Queries, header values, filenames and file bytes stay in this tab. The app loads its own static reference files and CoolCode’s shared usage counter. It stores no inputs automatically. Download an inspection JSON if you want to retain one; that file includes the filename and first 64 bytes.

HTTP Content-Type · MIME Sniffing Standard