Check If Image Is PNG Online
Verify whether an uploaded image is in PNG format online.
Drop image here or click to upload
Max 50MB • 100% Private
Drop an image and find out whether it's actually a PNG — not just a file with a .png extension. The check reads the first 8 bytes of the file and matches them against the PNG magic number (89 50 4E 47 0D 0A 1A 0A), so a renamed JPEG or WebP gets caught instantly. And everything runs in your browser. Nothing gets uploaded.
How It Works
Every PNG file starts with the same 8-byte header — it's baked into the spec. This tool grabs those bytes from your file using a FileReader and compares them against the known PNG magic number. If they match, it is a genuine PNG. If they don't match, the file is something else regardless of what the extension claims. The whole check takes milliseconds.
Examples
Renamed JPEG Caught Red-Handed
A colleague renamed photo.jpg to photo.png before sending it over. The extension lies, but the bytes don't.
photo.png (renamed JPEG)
Header: FF D8 FF E0 ...
❌ Not a PNG
Detected: JPEG (FF D8 FF)
Legitimate PNG with Transparency
You exported a logo from Figma and need to confirm it actually saved as PNG before pushing it to the CDN.
brand-logo.png
Header: 89 50 4E 47 0D 0A 1A 0A
✅ Valid PNG
Signature matches PNG spec
WebP Masquerading as PNG
Downloaded an image from a website that served WebP files with .png URLs — browsers do this silently, and "Save As" keeps the wrong extension.
hero-banner.png (actually WebP)
Header: 52 49 46 46 ... 57 45 42 50
❌ Not a PNG
Detected: WebP (RIFF...WEBP)
Who Uses This
Validating user-uploaded images before processing them in a pipeline or storing them in a bucket.
Double-checking that exported assets are actually PNG before handing off to dev — transparency issues are painful to debug later.
Verifying that image upload forms properly reject non-PNG files even when the extension is spoofed.
Making sure header images are real PNGs so Outlook and older clients don't butcher the rendering.
Common Mistakes
A .png extension means nothing on its own. Anyone can rename a BMP, JPEG, or GIF to .png. Always check the actual file header if format matters for your workflow.
Most image viewers and browsers will display a JPEG even if it has a .png extension. The image showing up correctly doesn't prove it is a PNG — it just means the viewer is forgiving.
Opening a JPEG in an editor and exporting as PNG does create a valid PNG file, but the JPEG compression artifacts are baked in. You get a bigger file with the same quality. This tool confirms the format is PNG — it can not tell you if the original source was lossless.
Technical Details
- Processing: 100% client-side — files never leave your browser
- Detection Method: Magic number comparison (first 8 bytes)
- PNG Signature:
89 50 4E 47 0D 0A 1A 0A - File Size Limit: None — only the header is read, so even multi-GB files check instantly
- Browser Support: Chrome, Firefox, Safari, Edge
Frequently Asked Questions
How can I tell if a file is really a PNG?
Every real PNG starts with the same 8-byte sequence: 89 50 4E 47 0D 0A 1A 0A. This tool reads those bytes directly from the file and checks for a match. If the signature is there, it is genuinely a PNG — the extension alone can not be trusted.
Can a JPEG have a .png extension?
Yes. File extensions are just part of the filename — they don't change the actual data inside. You can rename any file to .png and your operating system won't stop you. That's exactly why checking the binary header matters.
Does this tool upload my image to a server?
No. The file is read entirely in your browser using JavaScript. Nothing gets sent anywhere. You can disconnect from the internet and the tool still works.
What's the difference between PNG and JPEG?
PNG uses lossless compression and supports transparency. JPEG uses lossy compression — smaller files, but some detail is permanently thrown away. PNG is better for logos, icons, and screenshots. JPEG works well for photographs where file size matters more than pixel-perfect accuracy.
Why do some websites save images as .png when they're actually WebP?
Many CDNs and CMS platforms serve WebP files for better compression but keep .png in the URL for backwards compatibility. When you right-click and "Save Image As," the browser uses the URL's extension. The file you save is WebP even though the name says .png. This tool catches that instantly.