Skip to main content

MIME Type Lookup API

REAL DATA

The complete IANA media type registry with file extensions merged in — look up any type or extension, or strictly parse a Content-Type value into its parts.

Authoritative reference data or standards computation

Base URL
/api/mime-types
Capabilities
3 routes
Last updated
July 30, 2026
Data sources · 3

GET /api/mime-types

Filters are ANDed and results stay in registry order (alphabetical by media type). With no filters this returns the whole table — every filter genuinely narrows it, and no match is an empty list with a warning, never a substituted row.

Live requestRuns against the public API
No key required
GET/api/mime-types?category=font

Request parameters

Only return types under this top-level type.

Case-insensitive substring match against the media type or any of its extensions (a leading dot is ignored, so 'search=.md' works).

'yes' keeps only types in the IANA registry; 'no' keeps only the de-facto types that were never registered.

'yes' keeps only types with at least one known file extension — most of the registry has none.

Advanced response options6 options

Limit the number of returned records (1–100). Defaults to all matches.

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/mime-types?category=font"
const res = await fetch("https://randomapi.dev/api/mime-types?category=font");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/mime-types?category=font").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/mime-types?category=font"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 4
category enum

Only return types under this top-level type.

default: any
allowed: application | audio | chemical | font | haptics | image | message | model | multipart | text | video | x-conference | x-shader | any
example: category=font
search string

Case-insensitive substring match against the media type or any of its extensions (a leading dot is ignored, so 'search=.md' works).

example: search=json
registered enum

'yes' keeps only types in the IANA registry; 'no' keeps only the de-facto types that were never registered.

default: any
allowed: any | yes | no
example: registered=no
hasExtension enum

'yes' keeps only types with at least one known file extension — most of the registry has none.

default: any
allowed: any | yes | no
example: hasExtension=yes
Universal parameters Shared response and formatting options 6
count int

Limit the number of returned records (1–100). Defaults to all matches.

default: all matches
allowed: 1 – 100
example: count=3
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=mimeType,extensions
exclude list

Return all fields except these (comma-separated).

example: exclude=note
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 8
mimeType string

The full media type (type/subtype), lowercase. Media types are case-insensitive (RFC 2045 §5.1); IANA spells some registrations with capitals.

example: application/pdf

extensions string[]

File extensions associated with this type (lowercase, no dot, sorted). Empty for the many registered types that have no conventional extension. Some extensions are claimed by more than one type — /lookup?ext= resolves those to one answer and names the alternatives.

example: ["pdf"]

category string

Top-level type, one of: application | audio | chemical | font | haptics | image | message | model | multipart | text | video | x-conference | x-shader.

example: application

description string nullable

One practical sentence about the format, written for this API — IANA publishes no prose. null for registry rows nobody has annotated, which is most of them; a made-up sentence would be worse than none.

example: Portable Document Format (RFC 8118).

compressible boolean nullable

Whether gzip/brotli meaningfully shrinks typical content of this type (text-based formats yes; already-compressed containers no). null when mime-db has no judgement.

example: false

registered boolean

Whether the type appears in the IANA Media Types registry. false marks a de-facto type real servers send that was never registered (video/x-matroska, text/x-python…).

example: true

reference string nullable

IANA's Reference cell, verbatim — the defining RFC, standards body or registrant. null for unregistered types.

example: [RFC8118]

note string nullable

IANA's own annotation on the registration, verbatim — this is how the registry marks a type deprecated or obsoleted. null for all but a handful of rows.

example: OBSOLETED in favor of text/javascript

Documented examples

Build-generated requests and complete responses
5
All font types
GET /api/mime-types?category=font
{
  "data": [
    {
      "mimeType": "font/collection",
      "extensions": [
        "ttc"
      ],
      "category": "font",
      "description": "TrueType/OpenType font collection (RFC 8081).",
      "compressible": true,
      "registered": true,
      "reference": "[RFC8081]",
      "note": null
    },
    {
      "mimeType": "font/otf",
      "extensions": [
        "otf"
      ],
      "category": "font",
      "description": "OpenType font (RFC 8081).",
      "compressible": true,
      "registered": true,
      "reference": "[RFC8081]",
      "note": null
    },
    {
      "mimeType": "font/sfnt",
      "extensions": [],
      "category": "font",
      "description": null,
      "compressible": null,
      "registered": true,
      "reference": "[RFC8081]",
      "note": null
    },
    {
      "mimeType": "font/ttf",
      "extensions": [
        "ttf""generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Everything JSON-flavoured
GET /api/mime-types?search=json
{
  "data": [
    {
      "mimeType": "application/3gpp-mbs-object-manifest+json",
      "extensions": [],
      "category": "application",
      "description": null,
      "compressible": null,
      "registered": true,
      "reference": "[_3GPP_TSG_SA_WG4][Dongwook_Kim]",
      "note": null
    },
    {
      "mimeType": "application/3gpp-mbs-user-service-descriptions+json",
      "extensions": [],
      "category": "application",
      "description": null,
      "compressible": null,
      "registered": true,
      "reference": "[_3GPP_TSG_SA_WG4][Dongwook_Kim]",
      "note": null
    },
    {
      "mimeType": "application/3gpp-media-delivery-metrics-report+json",
      "extensions": [],
      "category": "application",
      "description": null,
      "compressible": null,
      "registered": true,
      "reference": "[_3GPP_TSG_SA_WG4][Dongwook_Kim]",
      "note": null
    },
    {
      "mimeType": "application/3gpphal+json",
      "extensions": [],
      "category": "application",
      "description": null,
      "compressible": true,
      "registered": true,
      "reference": "[_3GPP][Ulrich_Wiehe]",
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Image types that have a file extension
GET /api/mime-types?category=image&hasExtension=yes
{
  "data": [
    {
      "mimeType": "image/aces",
      "extensions": [
        "exr"
      ],
      "category": "image",
      "description": null,
      "compressible": null,
      "registered": true,
      "reference": "[SMPTE][Howard_Lukk]",
      "note": null
    },
    {
      "mimeType": "image/apng",
      "extensions": [
        "apng"
      ],
      "category": "image",
      "description": "Animated PNG — backwards-compatible PNG extension with full-color animation.",
      "compressible": false,
      "registered": true,
      "reference": "[W3C][W3C_PNG_WG]",
      "note": null
    },
    {
      "mimeType": "image/avci",
      "extensions": [
        "avci"
      ],
      "category": "image",
      "description": null,
      "compressible": null,
      "registered": true,
      "reference": "[ISO-IEC_JTC_1][David_Singer]",
      "note": null
    },
    {
      "mimeType": "image/avcs",
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
De-facto types nobody ever registered
GET /api/mime-types?registered=no&hasExtension=yes
{
  "data": [
    {
      "mimeType": "application/appinstaller",
      "extensions": [
        "appinstaller"
      ],
      "category": "application",
      "description": null,
      "compressible": false,
      "registered": false,
      "reference": null,
      "note": null
    },
    {
      "mimeType": "application/applixware",
      "extensions": [
        "aw"
      ],
      "category": "application",
      "description": null,
      "compressible": null,
      "registered": false,
      "reference": null,
      "note": null
    },
    {
      "mimeType": "application/appx",
      "extensions": [
        "appx"
      ],
      "category": "application",
      "description": null,
      "compressible": false,
      "registered": false,
      "reference": null,
      "note": null
    },
    {
      "mimeType": "application/appxbundle",
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Video types, type and extensions only
GET /api/mime-types?category=video&fields=mimeType,extensions&count=20
{
  "data": [
    {
      "mimeType": "video/1d-interleaved-parityfec",
      "extensions": []
    },
    {
      "mimeType": "video/3gpp",
      "extensions": [
        "3gp",
        "3gpp"
      ]
    },
    {
      "mimeType": "video/3gpp-tt",
      "extensions": []
    },
    {
      "mimeType": "video/3gpp2",
      "extensions": [
        "3g2"
      ]
    },
    {
      "mimeType": "video/av1",
      "extensions": []
    },
    {
      "mimeType": "video/bmpeg",
      "extensions": []
    },
    {
      "mimeType": "video/bt656",
      "extensions": []
    },
    {
      "mimeType": "video/celb",
      "extensions": []
    },
    {
    …
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}

GET /api/mime-types/lookup

Provide ext or type. When both are given, ext wins and a warning is added. An extension claimed by several types resolves to a pinned winner and warns with the alternatives. Unknown values return a 404 with the closest real matches — never a substitute type.

Live requestRuns against the public API
No key required
GET/api/mime-types/lookup?ext=pdf

Request parameters

File extension to resolve (case-insensitive; a leading dot is fine: 'pdf' or '.pdf').

Exact media type to look up (case-insensitive), e.g. to find its extensions.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/mime-types/lookup?ext=pdf"
const res = await fetch("https://randomapi.dev/api/mime-types/lookup?ext=pdf");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/mime-types/lookup?ext=pdf").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/mime-types/lookup?ext=pdf"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 2
ext string

File extension to resolve (case-insensitive; a leading dot is fine: 'pdf' or '.pdf').

example: ext=pdf
type string

Exact media type to look up (case-insensitive), e.g. to find its extensions.

example: type=application/pdf
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=mimeType,extensions
exclude list

Return all fields except these (comma-separated).

example: exclude=note
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 8
mimeType string

The full media type (type/subtype), lowercase. Media types are case-insensitive (RFC 2045 §5.1); IANA spells some registrations with capitals.

example: application/pdf

extensions string[]

File extensions associated with this type (lowercase, no dot, sorted). Empty for the many registered types that have no conventional extension. Some extensions are claimed by more than one type — /lookup?ext= resolves those to one answer and names the alternatives.

example: ["pdf"]

category string

Top-level type, one of: application | audio | chemical | font | haptics | image | message | model | multipart | text | video | x-conference | x-shader.

example: application

description string nullable

One practical sentence about the format, written for this API — IANA publishes no prose. null for registry rows nobody has annotated, which is most of them; a made-up sentence would be worse than none.

example: Portable Document Format (RFC 8118).

compressible boolean nullable

Whether gzip/brotli meaningfully shrinks typical content of this type (text-based formats yes; already-compressed containers no). null when mime-db has no judgement.

example: false

registered boolean

Whether the type appears in the IANA Media Types registry. false marks a de-facto type real servers send that was never registered (video/x-matroska, text/x-python…).

example: true

reference string nullable

IANA's Reference cell, verbatim — the defining RFC, standards body or registrant. null for unregistered types.

example: [RFC8118]

note string nullable

IANA's own annotation on the registration, verbatim — this is how the registry marks a type deprecated or obsoleted. null for all but a handful of rows.

example: OBSOLETED in favor of text/javascript

Documented examples

Build-generated requests and complete responses
5
What type is .pdf?
GET /api/mime-types/lookup?ext=pdf
{
  "data": {
    "mimeType": "application/pdf",
    "extensions": [
      "pdf"
    ],
    "category": "application",
    "description": "Portable Document Format (RFC 8118).",
    "compressible": false,
    "registered": true,
    "reference": "[RFC8118]",
    "note": null
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/lookup",
    "params": {
      "ext": "pdf"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Which extensions are application/json?
GET /api/mime-types/lookup?type=application/json
{
  "data": {
    "mimeType": "application/json",
    "extensions": [
      "json",
      "map"
    ],
    "category": "application",
    "description": "JSON data (RFC 8259); .map covers JavaScript source maps.",
    "compressible": true,
    "registered": true,
    "reference": "[RFC8259]",
    "note": null
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/lookup",
    "params": {
      "type": "application/json"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Is SVG compressible?
GET /api/mime-types/lookup?ext=.svg&fields=mimeType,compressible
{
  "data": {
    "mimeType": "image/svg+xml",
    "compressible": true
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/lookup",
    "params": {
      "ext": "svg"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
An extension two types claim
GET /api/mime-types/lookup?ext=mp4
{
  "data": {
    "mimeType": "video/mp4",
    "extensions": [
      "mp4",
      "mp4v",
      "mpg4"
    ],
    "category": "video",
    "description": "MP4 (MPEG-4 Part 14) container — the most widely supported video format (RFC 4337).",
    "compressible": false,
    "registered": true,
    "reference": "[RFC4337][RFC6381]",
    "note": null
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/lookup",
    "params": {
      "ext": "mp4"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z",
    "warnings": [
      "'.mp4' is claimed by 2 media types — this API resolves it to 'video/mp4'. Also claiming it: application/mp4."
    ]
  }
}
A type IANA has obsoleted
GET /api/mime-types/lookup?type=application/javascript
{
  "data": {
    "mimeType": "application/javascript",
    "extensions": [
      "js"
    ],
    "category": "application",
    "description": null,
    "compressible": true,
    "registered": true,
    "reference": "[RFC4329][RFC9239]",
    "note": "OBSOLETED in favor of text/javascript"
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/lookup",
    "params": {
      "type": "application/javascript"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z",
    "warnings": [
      "IANA annotates 'application/javascript' as: OBSOLETED in favor of text/javascript."
    ]
  }
}

GET /api/mime-types/parse

Parses a singleton concrete media type. Unknown-but-valid types return known=false; malformed syntax, wildcards, duplicate parameters and CR/LF injection return 400.

Live requestRuns against the public API
No key required
GET/api/mime-types/parse?value=Application%2FJSON%3B+Charset%3D%22utf-8%22

Request parameters

One Content-Type field value, limited to 2048 characters and 32 ordered parameters.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/mime-types/parse?value=Application%2FJSON%3B%20Charset%3D%22utf-8%22"
const res = await fetch("https://randomapi.dev/api/mime-types/parse?value=Application%2FJSON%3B%20Charset%3D%22utf-8%22");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/mime-types/parse?value=Application%2FJSON%3B%20Charset%3D%22utf-8%22").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/mime-types/parse?value=Application%2FJSON%3B%20Charset%3D%22utf-8%22"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 1
value string required

One Content-Type field value, limited to 2048 characters and 32 ordered parameters.

allowed: 3 – 2048
example: value=Application/Problem+JSON; Charset="utf-8"; profile="https://example.test/problem"
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=contentType,mimeType
exclude list

Return all fields except these (comma-separated).

example: exclude=note
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 14
contentType string

Canonical type/subtype plus normalized parameter syntax.

example: application/problem+json;charset=utf-8;profile="https://example.test/problem"

mimeType string

Lowercase type/subtype essence without parameters.

example: application/problem+json

type string

Lowercase top-level media type.

example: application

subtype string

Lowercase media subtype, including any structured suffix.

example: problem+json

suffix string nullable

Structured syntax suffix after the last +, or null.

example: json

parameters object[]

Ordered lowercase names with decoded token/quoted values.

example: [{"name":"charset","value":"utf-8"}]

known boolean

Whether the essence appears in this endpoint's dataset (the IANA registry plus de-facto types).

example: true

registered boolean

Whether the essence is in the IANA Media Types registry snapshot. false for a valid but unregistered type.

example: true

extensions string[]

Known file extensions, or an empty list for a type with none.

example: ["json"]

category string nullable

Top-level type when known, otherwise null.

example: application

description string nullable

Curated practical description when one has been written, otherwise null.

example: JSON data (RFC 8259); .map covers JavaScript source maps.

compressible boolean nullable

Compression guidance when known, otherwise null.

example: true

reference string nullable

IANA's Reference cell for the essence, verbatim; null when unregistered or unknown.

example: [RFC8259]

note string nullable

IANA's deprecation annotation for the essence, verbatim; null for almost every type.

example: OBSOLETED in favor of text/javascript

Documented examples

Build-generated requests and complete responses
4
Parse JSON with a quoted charset
GET /api/mime-types/parse?value=Application%2FJSON%3B%20Charset%3D%22utf-8%22
{
  "data": {
    "contentType": "application/json;charset=utf-8",
    "mimeType": "application/json",
    "type": "application",
    "subtype": "json",
    "suffix": null,
    "parameters": [
      {
        "name": "charset",
        "value": "utf-8"
      }
    ],
    "known": true,
    "registered": true,
    "extensions": [
      "json",
      "map"
    ],
    "category": "application",
    "description": "JSON data (RFC 8259); .map covers JavaScript source maps.",
    "compressible": true,
    "reference": "[RFC8259]",
    "note": null
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/parse",
    "params": {
      "value": "application/json;charset=utf-8"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Expose a structured +json suffix
GET /api/mime-types/parse?value=application%2Fproblem%2Bjson%3Bprofile%3D%22https%3A%2F%2Fexample.test%2Fproblem%22
{
  "data": {
    "contentType": "application/problem+json;profile=\"https://example.test/problem\"",
    "mimeType": "application/problem+json",
    "type": "application",
    "subtype": "problem+json",
    "suffix": "json",
    "parameters": [
      {
        "name": "profile",
        "value": "https://example.test/problem"
      }
    ],
    "known": true,
    "registered": true,
    "extensions": [],
    "category": "application",
    "description": "Machine-readable HTTP error details — type, title, status and detail (RFC 9457).",
    "compressible": true,
    "reference": "[RFC9457]",
    "note": null
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/parse",
    "params": {
      "value": "application/problem+json;profile=\"https://example.test/problem\""
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Accept a valid unregistered vendor type honestly
GET /api/mime-types/parse?value=application%2Fvnd.example.widget%2Bjson%3Bversion%3D2
{
  "data": {
    "contentType": "application/vnd.example.widget+json;version=2",
    "mimeType": "application/vnd.example.widget+json",
    "type": "application",
    "subtype": "vnd.example.widget+json",
    "suffix": "json",
    "parameters": [
      {
        "name": "version",
        "value": "2"
      }
    ],
    "known": false,
    "registered": false,
    "extensions": [],
    "category": null,
    "description": null,
    "compressible": null,
    "reference": null,
    "note": null
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/parse",
    "params": {
      "value": "application/vnd.example.widget+json;version=2"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}
Spot an obsoleted type
GET /api/mime-types/parse?value=application%2Fjavascript
{
  "data": {
    "contentType": "application/javascript",
    "mimeType": "application/javascript",
    "type": "application",
    "subtype": "javascript",
    "suffix": null,
    "parameters": [],
    "known": true,
    "registered": true,
    "extensions": [
      "js"
    ],
    "category": "application",
    "description": null,
    "compressible": true,
    "reference": "[RFC4329][RFC9239]",
    "note": "OBSOLETED in favor of text/javascript"
  },
  "meta": {
    "endpoint": "mime-types",
    "route": "/parse",
    "params": {
      "value": "application/javascript"
    },
    "generatedAt": "2026-07-30T15:14:08.000Z"
  }
}

About this API

Coverage & behavior

Every media type in the IANA Media Types registry — all 2,321 registrations across 10 top-level trees, snapshot 2026-07-22 — plus the de-facto types real servers send that were never registered. IANA does not publish file extensions, so those (and the compressible flag) are merged from mime-db 1.54.0 (MIT). 2,686 types in total, covering 1,248 distinct file extensions. Both upstream snapshots are pinned by SHA-256 and rebuilt by a committed refresh script.

Every row says where it comes from: registered is true only for types actually in the IANA registry, reference is IANA's own Reference cell verbatim ([RFC8118]), and note carries the registry's own deprecation text — which is how you learn that application/javascript is OBSOLETED in favor of text/javascript.

Three routes:

  • /api/mime-types — the whole table, filterable by category, search (substring match on the type or any extension), registered and hasExtension. Unfiltered it returns everything, which is a large response — filter, or use count and fields.
  • /api/mime-types/lookup — resolve one entry by ext (file extension, leading dot optional, case-insensitive) or type (exact media type). Passing neither is a 400; passing both makes ext win with a warning; an unknown value is an honest 404 with the closest real matches — never a guessed application/octet-stream.
  • /api/mime-types/parse?value=… — strictly parse one RFC 9110 Content-Type value, including quoted parameters and structured-syntax suffixes such as +json. A syntactically valid vendor type returns known:false; it is not mistaken for an invalid field or a registered type.

Some extensions are genuinely claimed by several types (.mp4 by video/mp4 and application/mp4, .exe by four). /lookup?ext= answers with one pinned winner and warns you about the alternatives instead of pretending the ambiguity does not exist. Only description is editorial: it is written for this API for the types developers actually meet, and is null — never invented — for the rest.

Use it for

  • Set correct Content-Type headers from a file extension in upload/download handlers
  • Build MIME allow-lists for upload validation without hand-maintaining a table
  • Decide which responses are worth gzip/brotli compression via the compressible flag
  • Validate and canonicalize Content-Type parameters before processing an HTTP representation
  • Check whether a media type you were sent is actually IANA-registered or merely de-facto

Frequently asked questions

How do I find the MIME type for a file extension?

/api/mime-types/lookup?ext=svg answers image/svg+xml with description and compressibility — or reverse it with type=application/json to get the extensions.

Is this the complete IANA media types registry?

Yes — all 2,321 registrations from the 2026-07-22 snapshot, nothing filtered out, plus 365 unregistered de-facto types flagged with registered: false.

What happens when two types claim the same extension?

/lookup?ext=mp4 returns video/mp4 and warns that application/mp4 also claims it. Each of those decisions is pinned in the dataset with a reason, not left to array order.

What happens with an unknown extension?

An honest 404 that suggests the closest real extensions — never a guessed type. (Passing neither ext nor type is a 400: the lookup needs exactly one side.)

Can the API parse a complete Content-Type field value?

Yes. /parse validates one concrete RFC 9110 media type, decodes quoted parameters, exposes a +json-style suffix and tells you whether the essence is IANA-registered.

Standards & references