# File Format Inspector Identify and inspect files from their first bytes: magic numbers, PNG, JPEG, GIF, WebP, ZIP, gzip and PDF headers. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://file-formats.x402tookit.com/openapi.json - x402 manifest: https://file-formats.x402tookit.com/.well-known/x402 - Catalog (free): https://file-formats.x402tookit.com/catalog - Health (free): https://file-formats.x402tookit.com/health - Uptime (free): https://file-formats.x402tookit.com/uptime ## Endpoints (9) ### GET /extension-vs-content — $0.02 Compare a file name's extension with its real type from the first bytes; flags executables disguised as documents or images. Params: filename: string, hex: string Example: https://file-formats.x402tookit.com/extension-vs-content?filename=invoice.pdf&hex=4d5a90000300000004000000ffff0000 ### GET /gif-header — $0.02 Read a GIF's version, width, height and global colour table size from its first 13 bytes. Params: hex: string Example: https://file-formats.x402tookit.com/gif-header?hex=47494638396101000100800000ffffff00000021f904 ### GET /gzip-header — $0.02 Parse a gzip header: method, flags, modification time, original file name, OS and compression hint. Params: hex: string Example: https://file-formats.x402tookit.com/gzip-header?hex=1f8b0808806ae0630003686f73742e74787400 ### GET /jpeg-info — $0.02 Read a JPEG's width, height, components and baseline/progressive mode by walking its markers; flags JFIF and Exif. Params: hex: string Example: https://file-formats.x402tookit.com/jpeg-info?hex=ffd8ffe000104a46494600010100000100010000ffc0001108001e002803011100021101031101 ### GET /magic-bytes — $0.02 Identify a file type from the first bytes (hex): PNG, JPEG, PDF, ZIP, ELF, EXE, MP4, SQLite and 40+ more signatures. Params: hex: string Example: https://file-formats.x402tookit.com/magic-bytes?hex=89504e470d0a1a0a0000000d49484452 ### GET /pdf-header — $0.02 Read a PDF's version and header position from its first bytes; flags junk before %PDF- and an invalid version. Params: hex: string Example: https://file-formats.x402tookit.com/pdf-header?hex=255044462d312e370a25e2e3cfd30a312030206f626a ### GET /png-header — $0.02 Read a PNG's width, height, bit depth, colour type and interlace from its first 33 bytes, and verify the IHDR CRC. Params: hex: string Example: https://file-formats.x402tookit.com/png-header?hex=89504e470d0a1a0a0000000d49484452000000010000000108060000001f15c489 ### GET /webp-info — $0.02 Read a WebP's width, height, lossy/lossless/extended format, alpha and animation flags from its first 30 bytes. Params: hex: string Example: https://file-formats.x402tookit.com/webp-info?hex=52494646240000005745425056503820180000003001009d012a01000100020034250a04ced8b3 ### GET /zip-entry — $0.02 Parse a ZIP's first entry header: name, method, sizes, CRC, encryption, and zip-slip path or executable-name risks. Params: hex: string Example: https://file-formats.x402tookit.com/zip-entry?hex=504b030414000000080000002100aabbccdd0a0000000a00000008000000612f62632e747874 ## Terms Header inspection computed locally from hex bytes the caller sends, per the published format specifications, provided as is. Only a prefix of the file is examined: a matching header does not prove the rest of the file is valid, clean or safe, and this is not malware detection. Send only the first few hundred bytes, never whole files or private content. Not security advice.