← KBPDF Guides

JPEG, PNG or WebP: choosing a format for form uploads

Half the file-size problems people fight with are actually format problems. The wrong container makes a job impossible that the right one solves in one step.

Updated 2026-09-19 · KBPDF

Lossy and lossless, and why it decides everything

JPEG is lossy. It achieves small files by permanently discarding information the eye is poor at noticing, mainly fine colour variation and subtle gradients. You cannot get the discarded data back, and each time you re-save the file a little more goes.

PNG is lossless. It compresses by finding repetition, and it reconstructs the original pixel for pixel. Nothing is discarded, which also means there is no quality dial to turn when you need the file smaller.

That single difference decides which one to use, and it depends entirely on what the picture contains.

Photographs belong in JPEG

A photograph is millions of slightly different colours with almost no exact repetition, which is the worst possible input for PNG's compression strategy. A passport photo saved as PNG is routinely five to ten times larger than the same image as a JPEG at a quality nobody could distinguish by eye.

If you are fighting to get a photo under 50 KB and it refuses to move, check the format before you touch anything else. A 2 MB PNG that will not compress is the most common version of this problem, and converting to JPEG usually solves it outright.

Government portals overwhelmingly expect JPEG for photographs anyway, so this is rarely a trade-off.

Signatures and text belong in PNG

Now invert it. A signature is a few dark strokes on a white field: large flat areas and sharp high-contrast edges. That is PNG's ideal input and JPEG's worst case.

JPEG's block-based compression produces visible artefacts around sharp edges, the faint grey halos and speckles known as ringing. On a signature they show up as dirt around every stroke, and the white background stops being uniformly white, which matters when a validator checks for a clean background.

PNG keeps the strokes crisp and the background exactly white, and because the image is mostly one flat colour the file is small anyway. The same reasoning applies to screenshots and scanned text.

The complication is that many forms demand JPEG for the signature too. If so, use a high quality setting and keep the dimensions modest; the artefacts scale with how hard you compress.

WebP and AVIF: better formats you usually cannot use

WebP and AVIF are genuinely superior. They produce noticeably smaller files at equivalent quality and handle both photographic and flat-colour content well.

They are also the wrong answer for a form upload, because government and examination portals almost universally reject them. Validators tend to be old and conservative, and a format the backend does not recognise fails regardless of technical merit.

This is a live problem rather than a theoretical one, because phones and messaging apps increasingly produce these formats by default. A photo received over a chat app may well be WebP even though it looks like an ordinary picture. Check what you actually have before uploading.

HEIC, the iPhone problem

HEIC deserves its own mention because it causes more failed uploads than any other format. iPhones save photos as HEIC by default, and effectively no government portal accepts it.

Worse, it often does not look like a problem. The file may appear as a normal photo on the phone, and some transfer paths quietly rename it without converting it. A validator reads the bytes, not the extension, and rejects it.

Either change the camera setting to Most Compatible, which makes the phone save JPEG directly, or convert properly before uploading. Renaming does not work, because the contents are unchanged.

Quick reference

You can convert between all of these with the image converter, and compress the result to an exact size with the custom-size tools. Everything runs in your browser, so identity documents never leave your device.

Related guides