PNG Verifier

Reads an uploaded file's raw bytes in your browser and verifies whether it's a genuine PNG by checking both the standard 8-byte PNG file signature and the structure of the mandatory IHDR chunk that must immediately follow it. Nothing is uploaded to a server. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

Not every file with a .png extension is actually a valid PNG — this tool checks the real byte structure to tell you for certain.

It reads the file locally in your browser and never uploads it anywhere.

What Is PNG Verifier?

A byte-level PNG format verifier that checks a file against the two structural requirements the PNG specification mandates at the very start of every valid file: the 8-byte signature, and a well-formed IHDR chunk immediately after it.

It reports each check separately, so you can see whether a file failed at the signature stage or the chunk-structure stage.

How PNG Verifier Works

The uploaded file's raw bytes are compared byte-for-byte against the standard PNG signature (0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A).

If that matches, the next 4 bytes (the first chunk's declared length) and the following 4 bytes (its ASCII type) are checked: a valid IHDR chunk must declare a length of exactly 13 and a type of "IHDR".

When To Use PNG Verifier

Use it when you've received a file claiming to be a PNG from an untrusted or unknown source and want to confirm it before processing it further.

It's also useful for debugging a PNG that other tools are rejecting, to narrow down whether the problem is the signature, the IHDR chunk, or something later in the file.

Features

Advantages

  • Checks the file's real byte structure, not just its filename extension.
  • Distinguishes a missing signature from a broken IHDR chunk, giving a more specific diagnosis than a single pass/fail.
  • Runs entirely client-side, so the file never leaves your device.

Limitations

  • Only validates the signature and IHDR chunk — a file could pass this check but still have corruption later in its chunk stream (e.g. in the IDAT image data); this isn't a full PNG decoder/validator.
  • Doesn't report the image's actual dimensions or color type; use the PNG Analyzer or Dimensions Finder for that once a file passes verification.

Examples

Genuine PNG file

Input

A normally-exported PNG image

Output

isPng: true, hasValidSignature: true, hasValidIhdrChunk: true

A standard PNG export always starts with the correct signature followed by a well-formed IHDR chunk.

A JPEG renamed to .png

Input

A JPEG file with its extension changed to .png

Output

isPng: false, hasValidSignature: false

Renaming a file doesn't change its actual byte content; the JPEG signature bytes don't match the PNG signature.

Best Practices & Notes

Best Practices

  • Verify files from untrusted sources before feeding them into other image-processing tools.
  • If hasValidSignature is true but hasValidIhdrChunk is false, treat the file as corrupted rather than just misnamed.

Developer Notes

Both the signature check and the IHDR chunk validation are pure functions over a plain Uint8Array, fully unit-tested without any file-reading dependency; only reading the uploaded File into raw bytes happens in the browser-only component.

PNG Verifier Use Cases

  • Confirming a downloaded or received file is a genuine PNG before processing it
  • Diagnosing whether a rejected file failed at the signature or chunk-structure stage
  • Screening user-uploaded files in a workflow that requires real PNGs

Common Mistakes

  • Trusting a .png file extension as proof of file format — always check the actual bytes for anything security- or correctness-sensitive.
  • Assuming a failed verification means the file is fully unreadable; some tools ignore the IHDR chunk and may still partially process a malformed file inconsistently, which is exactly why strict verification matters.

Tips

  • If verification fails, try re-exporting the original image as PNG from its source application rather than manually renaming a different format.
  • Pair this with the PNG Analyzer once a file passes, to inspect its actual dimensions and content.

References

Frequently Asked Questions