{
  "$schema": "https://original.wales/schemas/data.schema.json",
  "generated": "2026-11-06T12:42:18.015Z",
  "id": "file-signatures",
  "title": "FILE SIGNATURES",
  "summary": "Common magic numbers used to identify a file from its first bytes.",
  "source": "https://www.garykessler.net/library/file_sigs.html",
  "license": "Reference data; verify against the format specification",
  "updated": "2026-11-04",
  "page": "https://original.wales/data/file-signatures/",
  "csv": "https://original.wales/data/file-signatures.csv",
  "columns": [
    "format",
    "extension",
    "hex",
    "offset",
    "notes"
  ],
  "rows": [
    {
      "format": "PNG",
      "extension": ".png",
      "hex": "89 50 4E 47 0D 0A 1A 0A",
      "offset": "0",
      "notes": "Portable Network Graphics"
    },
    {
      "format": "JPEG",
      "extension": ".jpg",
      "hex": "FF D8 FF",
      "offset": "0",
      "notes": "JPEG image"
    },
    {
      "format": "GIF",
      "extension": ".gif",
      "hex": "47 49 46 38",
      "offset": "0",
      "notes": "GIF87a or GIF89a"
    },
    {
      "format": "PDF",
      "extension": ".pdf",
      "hex": "25 50 44 46 2D",
      "offset": "0",
      "notes": "%PDF-"
    },
    {
      "format": "ZIP",
      "extension": ".zip",
      "hex": "50 4B 03 04",
      "offset": "0",
      "notes": "PKZip; also used by many container formats"
    },
    {
      "format": "GZIP",
      "extension": ".gz",
      "hex": "1F 8B",
      "offset": "0",
      "notes": "Gzip compressed data"
    },
    {
      "format": "BZIP2",
      "extension": ".bz2",
      "hex": "42 5A 68",
      "offset": "0",
      "notes": "BZh"
    },
    {
      "format": "XZ",
      "extension": ".xz",
      "hex": "FD 37 7A 58 5A 00",
      "offset": "0",
      "notes": "XZ compressed data"
    },
    {
      "format": "7ZIP",
      "extension": ".7z",
      "hex": "37 7A BC AF 27 1C",
      "offset": "0",
      "notes": "7-Zip archive"
    },
    {
      "format": "RAR",
      "extension": ".rar",
      "hex": "52 61 72 21 1A 07",
      "offset": "0",
      "notes": "RAR archive"
    },
    {
      "format": "TAR",
      "extension": ".tar",
      "hex": "75 73 74 61 72",
      "offset": "257",
      "notes": "ustar at offset 257"
    },
    {
      "format": "ELF",
      "extension": "",
      "hex": "7F 45 4C 46",
      "offset": "0",
      "notes": "Linux/Unix executable"
    },
    {
      "format": "PE",
      "extension": ".exe",
      "hex": "4D 5A",
      "offset": "0",
      "notes": "DOS/Windows executable"
    },
    {
      "format": "MACH-O",
      "extension": "",
      "hex": "FE ED FA CE",
      "offset": "0",
      "notes": "32-bit Mach-O, big-endian"
    },
    {
      "format": "MACH-O",
      "extension": "",
      "hex": "CF FA ED FE",
      "offset": "0",
      "notes": "64-bit Mach-O, little-endian"
    },
    {
      "format": "WASM",
      "extension": ".wasm",
      "hex": "00 61 73 6D",
      "offset": "0",
      "notes": "WebAssembly binary"
    },
    {
      "format": "SQLITE",
      "extension": ".sqlite",
      "hex": "53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00",
      "offset": "0",
      "notes": "SQLite 3 database"
    },
    {
      "format": "MP3",
      "extension": ".mp3",
      "hex": "49 44 33",
      "offset": "0",
      "notes": "ID3 tag; audio may follow"
    },
    {
      "format": "OGG",
      "extension": ".ogg",
      "hex": "4F 67 67 53",
      "offset": "0",
      "notes": "Ogg container"
    },
    {
      "format": "FLAC",
      "extension": ".flac",
      "hex": "66 4C 61 43",
      "offset": "0",
      "notes": "fLaC"
    },
    {
      "format": "WAV",
      "extension": ".wav",
      "hex": "52 49 46 46",
      "offset": "0",
      "notes": "RIFF container"
    },
    {
      "format": "MP4",
      "extension": ".mp4",
      "hex": "66 74 79 70",
      "offset": "4",
      "notes": "ftyp box at offset 4"
    },
    {
      "format": "WEBM",
      "extension": ".webm",
      "hex": "1A 45 DF A3",
      "offset": "0",
      "notes": "Matroska/WebM container"
    },
    {
      "format": "WOFF",
      "extension": ".woff",
      "hex": "77 4F 46 46",
      "offset": "0",
      "notes": "Web Open Font Format"
    },
    {
      "format": "WOFF2",
      "extension": ".woff2",
      "hex": "77 4F 46 32",
      "offset": "0",
      "notes": "Web Open Font Format 2"
    },
    {
      "format": "TTF",
      "extension": ".ttf",
      "hex": "00 01 00 00",
      "offset": "0",
      "notes": "TrueType font"
    },
    {
      "format": "OTF",
      "extension": ".otf",
      "hex": "4F 54 54 4F",
      "offset": "0",
      "notes": "OpenType font"
    },
    {
      "format": "ICO",
      "extension": ".ico",
      "hex": "00 00 01 00",
      "offset": "0",
      "notes": "Windows icon"
    },
    {
      "format": "BMP",
      "extension": ".bmp",
      "hex": "42 4D",
      "offset": "0",
      "notes": "Windows bitmap"
    },
    {
      "format": "TIFF",
      "extension": ".tif",
      "hex": "49 49 2A 00",
      "offset": "0",
      "notes": "Little-endian TIFF; big-endian starts 4D 4D 00 2A"
    }
  ]
}