Free file format API
Static JSON for every format. No API key, no rate limit, CORS enabled.
Every one of the 289 formats in the database is available as plain JSON. The API is fully static, so it is fast, free and never goes down under load. Use it in your own apps, scripts or docs. A link back to WhatFileType is appreciated but not required.
Endpoints
Get one format
Returns the full record for a single extension.
GET https://whatfiletype.com/api/format/{ext}.jsonExample:
curl https://whatfiletype.com/api/format/heic.json
List all formats
Returns an index of every format with links to each full record.
GET https://whatfiletype.com/api/formats
File signatures dataset
The complete magic-numbers reference as one JSON file: every signature with its hex bytes, offset, the formats that share it and a link to its page.
GET https://whatfiletype.com/api/signatures
Example response
{
"ext": "heic",
"name": "HEIC",
"fullName": "High Efficiency Image Container",
"category": { "key": "image", "label": "Image" },
"mimeTypes": ["image/heic", "image/heif"],
"binary": true,
"signatures": [
{ "hex": "66 74 79 70 68 65 69", "offset": 4, "note": "ftyp box, brand starts with 'hei'" }
],
"convertTo": ["JPG", "PNG", "WebP"],
"safety": "Safe. HEIC is a plain image container ..."
}Use it from JavaScript
const res = await fetch("https://whatfiletype.com/api/format/webp.json");
const data = await res.json();
console.log(data.mimeTypes); // ["image/webp"]Use it from Python
import urllib.request, json
url = "https://whatfiletype.com/api/format/parquet.json"
with urllib.request.urlopen(url) as r:
data = json.load(r)
print(data["signatures"]) # [{"hex": "50 41 52 31", "offset": 0, ...}]Fields
| Field | Type | Description |
|---|---|---|
| ext | string | Canonical extension, lowercase, no dot. |
| name | string | Short display name. |
| fullName | string | Full, expanded format name. |
| mimeTypes | string[] | One or more registered MIME types. |
| signatures | object[] | Magic-byte signatures with hex, offset and note. |
| openWith | object | Suggested apps per operating system. |
| convertTo | string[] | Sensible target formats for conversion. |
| safety | string | Plain-language note on whether the file is safe to open. |
Terms
The data is compiled from public specifications and offered under a CC BY 4.0 licence. Attribute WhatFileType when you republish it.