When Preview shows The file "name.png" could not be opened. It may be damaged or use a file format that Preview doesn't recognize, your PNG is either corrupted, misnamed, or not fully downloaded. macOS saves every screenshot as PNG by default, so the problem is common. The fix depends on the cause: a wrong file extension, a truncated download, an iCloud placeholder, or actual data corruption. Work through the checks below, from Terminal signature tests to the point where you need a dedicated repair tool.
Why Preview Rejects a PNG
Preview is strict. A real PNG must start with a specific 8-byte signature and end with a specific IEND chunk. Missing or altered, Preview refuses to open the file. The most common reasons:
- The file is not a PNG but carries a .png extension, like a renamed JPEG or a text file.
- The file was downloaded incompletely. The end is missing.
- An iCloud placeholder sits locally as an empty or partial file.
- The file is genuinely corrupted, often from a failed transfer or a faulty storage device.
Before anything else, check the file size in Finder. Zero bytes or unusually small for a screenshot? You likely have a placeholder or a partial download.
Check the Real File Format with Terminal
macOS includes two command-line tools that reveal a file's true nature: file and xxd. Open Terminal (in Utilities) and navigate to the folder containing the PNG. Then run these commands.
file image.pngprints the real format. PNG image data means a true PNG. Anything else, like JPEG or ASCII text, means the extension is wrong.xxd image.png | head -1shows the first line in hexadecimal. A valid PNG starts with89 50 4E 47 0D 0A 1A 0A. Different bytes mean the signature is corrupted.
If the signature is wrong but the file is otherwise readable, a hex editor can sometimes fix the first eight bytes. If the signature is correct and Preview still fails, move to the next check.
Verify the IEND Chunk at the End
What the Last 12 Bytes Should Look Like
A complete PNG always ends with a 12-byte IEND chunk. The last 12 bytes must be 00 00 00 00 49 45 4E 44 AE 42 60 82. Check this by running:
xxd image.png | tail -1
This prints the last line. Matching bytes confirm a proper ending. Different bytes or a missing final chunk mean the file is truncated. Interrupted downloads and bad copies cause this. Preview cannot open a truncated file; the PNG format requires the IEND chunk for completeness.
What to Do If the Ending Is Missing
Missing only a few bytes? Append the correct IEND chunk manually with a hex editor. Missing more than a few bytes? You need a repair tool that can rebuild the PNG structure from the remaining image data.
Screenshots PNG Won't Open on Mac
macOS saves screenshots (Cmd+Shift+3, Cmd+Shift+4, Cmd+Shift+5) as PNG files by default. A screenshot that won't open may not be a PNG at all despite the extension. Use the file command to verify. A genuine PNG screenshot is not damaged just because of its size. Several megabytes is normal.
To change the default format and sidestep the issue, run defaults write com.apple.screencapture type jpg in Terminal, then log out and back in. Future screenshots save as JPEG. Preview handles those with the same strictness. If a screenshot still won't open after these checks, the file itself is likely corrupted and needs repair.
ICloud Placeholders and Optimize Mac Storage
With Optimize Mac Storage turned on, a PNG stored in iCloud Drive may exist locally as a placeholder. That placeholder contains no image data until downloaded. Preview fails to open it if the download does not trigger, especially offline. The error message still says the file is damaged. The real issue: the file is not on your Mac.
Click the cloud download icon next to the file in Finder, or open the file while connected to the internet. Once fully downloaded and the icon disappears, try again. A corrupted placeholder? Delete it and re-download from iCloud. This is a common cause of PNGs refusing to open for users who rely on iCloud.
Use Sips to Read Header Data
macOS includes a built-in image tool called sips that reads image headers. Run sips -g all image.png in Terminal. Readable header chunks produce dimensions, format, and other metadata. An error like not an image file means the header is corrupted. Correct dimensions and format mean the header is intact; the issue may be with the image data itself or with Preview's cache. Try opening the file in another app or restarting Preview. If sips fails, the file is damaged and requires a repair tool.
When to Repair Instead of Replace
All checks done and the file still won't open? The PNG data is damaged beyond a simple header fix. This happens when the image data, the IDAT chunks, is corrupted. You have two options: find a backup or use a repair tool. For a free online option, use png.repair, designed to recover corrupted PNG files. Upload the broken file. The service attempts to rebuild the PNG structure, discarding unreadable data. It's a last resort, but it often recovers part of the image. No repair tool can restore completely missing data. The goal is to salvage what is there.