PNG vs JPG for Scanned Documents: Which One Should You Use?
PNG and JPG solve different problems. Using the wrong one for a scanned document is the #1 reason your file is way bigger than it should be.
Both PNG and JPG are just ways of storing a picture, but they compress completely differently — and picking the wrong one for a scanned ID, diploma, or attestation is the single easiest way to blow past a portal's size limit for no reason.
The core difference
JPG is lossy. It throws away detail the human eye barely notices (subtle color gradients, high-frequency noise) to shrink the file dramatically. Great for photos, which are full of that kind of detail anyway.
PNG is lossless. It keeps every pixel exactly as-is. Great for screenshots, logos, and anything with flat colors and sharp edges — but it doesn't compress photographic detail well at all, so a photo saved as PNG can end up 5–10x larger than the same photo as JPG, with no visible quality difference.
So which one for a scanned document?
- A scanned photo (ID photo, printed document photographed with a phone camera): JPG. It's full of photographic noise and gradients that JPG handles efficiently.
- A screenshot of a form, or a document exported directly as an image from a computer (not photographed): PNG can actually look sharper for text, since there's no compression artifacting around letters — but check the file size. If it's too large, convert to JPG; text stays perfectly readable at a reasonable JPG quality.
- A signature with a transparent background: PNG is required here — JPG can't do transparency at all, it'll fill the background solid white or black.
The mistake we see constantly
Someone photographs their CIN with their phone, the photo app saves it as HEIC, they convert it to PNG somewhere along the way (often without realizing it), and end up with an 8 MB "photo of a piece of paper" that a portal capped at 1 MB flatly rejects.
The fix: convert PNG to JPG for anything that started as a real photo, then compress to your portal's target size. You'll typically drop from megabytes to well under 500 KB with no visible quality loss, because JPG was built exactly for this kind of image.