{"uid":"cap_x9tfEHtMM2st-V0vvnLWH","slug":"png-header-inspector-842a2faf","name":"PNG Header Inspector","description":"Read a PNG's width, height, bit depth, colour type and interlace from its first 33 bytes, and verify the IHDR CRC.","url":"https://file-formats.x402tookit.com/png-header?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["hex"],"properties":{"hex":{"type":"string","description":"First 33 or more bytes of the PNG as hex (up to 512 bytes)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"width":{"type":["null","number"]},"height":{"type":["null","number"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"bitDepth":{"type":["null","number"]},"degraded":{"type":["boolean","null"]},"colorType":{"type":["null","number"]},"interlace":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"megapixels":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"bitsPerPixel":{"type":["null","number"]},"ihdrCrcValid":{"type":["boolean","null"]},"bytesExamined":{"type":["null","number"]},"colorTypeName":{"type":["null","string"]},"rawBytesEstimate":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8LST-pao7Pu2KF4XCqOCG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses the first 33 bytes of a PNG file to extract width, height, bit depth, colour type, and interlace method, and validates the IHDR CRC checksum.","exampleAgentPrompt":"Can you inspect this PNG's header and tell me its dimensions, colour type, bit depth, and whether the IHDR CRC is valid? Here are the first 33 bytes as hex: 89504e470d0a1a0a0000000d49484452000003200000025800080200000034.","exampleUseCases":[{"title":"Validating uploaded PNG integrity","prompt":"I just received a PNG file upload and want to make sure its header is well-formed before processing — can you check its width, height, and IHDR CRC using these first 33 bytes in hex: 89504e470d0a1a0a0000000d4948445200000280000001e00806000000?"},{"title":"Extracting image dimensions for a pipeline","prompt":"Without loading the full file, can you pull the width and height out of this PNG's raw header bytes so I can pre-allocate memory? Here's the hex: 89504e470d0a1a0a0000000d49484452000007800000043800080600000065."},{"title":"Identifying colour mode of a PNG asset","prompt":"I need to know if this PNG is RGBA, greyscale, or indexed colour — can you parse the colour type and bit depth from these header bytes: 89504e470d0a1a0a0000000d494844520000012000000120080300000025?"}],"resultDescription":"Returns a structured object containing width, height, bit depth, colour type (numeric and named), interlace method, megapixels, bits per pixel, raw bytes estimate, IHDR CRC validity flag, number of bytes examined, and optional summary, reasons, and disclaimer fields. Returns null for fields that cannot be determined if the input is malformed.","failureModes":["Fewer than 33 bytes provided in hex — fields may be null or partial","Invalid hex string — parse error returned","PNG magic bytes missing — IHDR not found, fields null","CRC mismatch — ihdrCrcValid returns false with reasons","Hex string exceeds 512 byte cap — truncated or rejected input"],"whenToPreferThis":"Use this endpoint when you need to quickly extract PNG image metadata (dimensions, colour mode, interlace) and verify header integrity from raw bytes without downloading or fully decoding the image. It is ideal for file validation pipelines, upload sanitisation, or forensic inspection where only the first bytes are available. Prefer it over general file-type detectors when you specifically need IHDR-level PNG details and CRC validation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:12:44.275Z","isFirstParty":false,"canonicalSlug":"png-header-inspector-842a2faf"}