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 file: every signature with its hex bytes, offset, variants, trailer, the formats that share it and a link to its page. Available as JSON and as CSV, because a JSON-only dataset quietly excludes everyone who works in a spreadsheet.
GET https://whatfiletype.com/api/signatures GET https://whatfiletype.com/api/signatures.csv
Schema and version
Every payload states which schema version it follows and when the data behind it last changed, so you can tell a stale cache from a real update without diffing. The full JSON Schema for a format record is fetchable, and the version endpoint carries the changelog.
GET https://whatfiletype.com/api/schema.json GET https://whatfiletype.com/api/version.json
Example response
{
"schemaVersion": 1,
"lastModified": "2026-07-30",
"license": "CC-BY-4.0",
"attribution": "File format data from WhatFileType (https://whatfiletype.com), licensed CC BY 4.0.",
"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 ...",
"sources": [{ "label": "ISO/IEC 23008-12", "url": "https://www.iso.org/standard/83650.html" }]
}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 the shell
# every extension that declares an image MIME type
curl -s https://whatfiletype.com/api/formats | jq -r '.formats[] | select(.mimeTypes[] | startswith("image/")) | .ext'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. |
| sources | object[] | References the record was checked against. See the methodology. |
| schemaVersion | integer | Payload shape. Bumped only on a breaking change, never on an added field. |
| lastModified | string | ISO date the data behind this record last changed. |
Changelog
Breaking changes get a new schemaVersion. Added fields do not, so parse defensively and ignore what you do not recognise.
2026-08-05 v1
- Added schemaVersion, lastModified, license and attribution to every endpoint payload.
- Added /api/version.json, /api/schema.json and /api/signatures.csv.
- Added the per-format sources array to /api/format/{ext}.json.
- Removed three related-format references that pointed at records which did not exist (class, cbor, bib).
2026-07-30 v1
- Published the full signature dataset at /api/signatures: 111 distinct magic numbers with offsets, variants, trailers and the formats that share them.
Terms
The data is compiled from public specifications and offered under a CC BY 4.0 licence. Attribution is the only condition. Use this exact sentence, with the URL as a real, followed link:
File format data from WhatFileType (https://whatfiletype.com), licensed CC BY 4.0.
The file signature reference sets out the provenance of the signature data, source by source, and offers the same table as an embeddable frame if you would rather link than copy.