Dev.to WebDev 🛠 Dev 👁 0 📖 8 min read

JPG vs PNG vs WebP for Online Forms: Which Format Actually Passes?

Ask a search engine which format to upload to a form and you will get a tidy answer about quality. Ask a form, and you get a different one: a rejection, or an acceptance, decided by arithmetic. The format question matter

Ask a search engine which format to upload to a form and you will get a tidy answer about quality. Ask a form, and you get a different one: a rejection, or an acceptance, decided by arithmetic. The format question matters for forms in a way it does not matter for your photo library, because each format has a hard floor on how small a photograph can go — and one of the three cannot reach the sizes forms demand, no matter what tool you use.

We know this because we measured it, on this site's own engine, with the same test photographs used across CrushKB. This guide gives you the measured results first and the theory second, so you can choose a format the way a form would: by whether the file can exist at the size requested.

What is the real difference between JPG, PNG and WebP?

JPG is lossy. It stores a photograph by keeping what eyes notice and discarding what they don't, and it has a quality dial: lower quality, smaller file, in fine steps, all the way down to very small indeed. That dial is why JPG is the natural format for size targets — almost any photograph can be brought to almost any size, at some cost to fine detail.

PNG is lossless. For photographs it shrinks files by reducing the palette — summarising the millions of colours in a photo into a set of, at most, 256 of them — and then, if the target still isn't met, by reducing dimensions. What it cannot do is discard detail the way JPG does. Every pixel's colour must be accounted for, exactly. On graphics that is a superpower. On photographs it is a floor.

WebP is the modern middle path. It compresses photographs more efficiently than JPG at the same quality, and handles graphics and transparency too. Its problem is not technical but administrative: many forms were built before WebP existed and their accepted-format lists have never been updated.

What actually happens when you ask for a photograph as a 100KB PNG?

On the PNG to 100KB tool, we ran a real photograph through the full ladder the engine offers for PNG: the palette stepped down from 256 colours toward 32, then the dimensions stepped down by 15% at a time, each step re-measured honestly. The ladder ran out. The tool's answer was a refusal, in its own words: "Even at the lowest quality and smallest size, this image cannot reach the target size of 100 KB. Try a larger target or JPG output." No file was produced, because producing one would have meant silently breaking one of the three promises — the size, the dimensions, or the format.

The same photograph at a 500 KB PNG target was refused too — the full ladder, exhausted again. Its first successful PNG fit came at the 2 MB target on the 2MB compressor: 1,864,246 bytes, at 1965 × 1474 pixels, in a 32-colour palette — a file nineteen times the 100 KB target, at three-fifths of its dimensions, with its colours summarised to thirty-two. That is not a failure of one tool. It is the measured price of losslessness on photographic content, and any service that promises you a full-size photo as a 100 KB PNG is planning to break one of the three promises without telling you.

Why does the same photograph fit easily as a JPG?

Because the quality dial has no floor problem. The identical photograph, compressed as a JPG at the 100 KB target on the 100KB compressor, came out at 91,636 bytes at its full 3200 × 2400 dimensions — under target, full size, recognisably itself. JPG spends detail instead of dimensions or palette: fine texture softens first, edges and faces hold up longest, and at the size a form displays the photo — a small box on a screen or a printed thumbnail — the trade is usually invisible.

This is why every size-target tool on the internet defaults to JPG for photographs, and why forms that specify a format almost always specify JPG first. It is not habit. It is the only one of the three formats whose compression method is shaped like the problem.

When does PNG win by a mile?

On its home ground: graphics. The chart from our test set — flat colours, sharp edges, text-like shapes — fitted as a PNG at 1,605 bytes, at its full 800 × 600 size, using two of its 256 palette entries. A JPG of the same chart is larger and slightly fuzzy at the edges, because JPG's method smears exactly the hard transitions graphics are made of. Screenshots, logos, diagrams, scanned signatures on white, charts for a report: PNG, every time, and it will usually be smaller than the JPG as well as sharper.

PNG also keeps transparency, which JPG cannot do at all — a logo that must sit on a coloured background has no JPG version worth uploading. The rule is not "PNG bad, JPG good". It is that the two formats have different homelands, and photographs belong to JPG's.

Which format do online forms actually accept?

JPG, nearly everywhere — it is the one format every form's list includes. PNG is accepted by most modern forms, especially for documents, signatures and screenshots. WebP is the gamble: support is growing on the open web, but exam portals, government forms and older application systems frequently refuse it outright, and some that accept the upload then fail to display or process it. If a form's instructions name the formats it wants, that list outranks every other consideration in this guide. If it names none, JPG for a photograph is the choice that has never been wrong.

Notice, too, what the strictest photo rules actually grade. The United Kingdom's passport photo rules, for example, are written entirely in dimensions and size:

[Your photo must be] at least 600 pixels wide and 750 pixels tall [and] at least 50KB and no more than 10MB
— GOV.UK, Get a passport photo — Rules for digital photos

Pixels and kilobytes — the portal grades the measurable properties of the file, and the format matters only through whether it can deliver them. A format that cannot reach the band cannot pass, however excellent its quality.

Why does WebP exist, if forms won't take it?

Because the open web is not a form. WebP was built for websites, where it genuinely shines: the same photograph at the same visible quality is noticeably smaller as a WebP than as a JPG, which is why blogs, shops and news sites serve it everywhere. If you are putting a photo on a web page, WebP is usually the right answer and this site's compressors will happily produce it. The trouble starts when a file made for the web meets a system built before WebP existed. Exam portals and government forms run on old, careful software; their format lists were written years ago and change slowly. A format can be technically better and administratively unacceptable at the same time, and the upload gate only grades the second quality. Keep WebP for the web, JPG for the form, and convert between them freely — the conversion is the cheap part.

What happens to quality when a photo is squeezed to a form size?

Less than people fear, at the sizes forms display. A form shows your photo in a small box — a few hundred pixels wide on screen, smaller still in print. A JPG compressed to 100 KB from a modern phone photo keeps its full dimensions in most cases, spending fine texture you would need to zoom in to miss: distant foliage, hair strands, fabric weave. Faces, documents and scenes stay clear, because the encoder protects edges and contrast first. The honest exception is the very tight target on a very detailed photo — a crowd scene at 20 KB will soften, because the arithmetic leaves nowhere else to take the bytes from. But the form was never going to show that crowd scene larger than a thumbnail anyway. Judge a compressed photo at the size it will be seen, not at 400% zoom, and the quality panic mostly evaporates.

Can you just rename a PNG to .jpg?

No — and forms can tell. A file's extension is a label; its format is its internal structure, and upload checkers read the structure, not the label. A PNG renamed to photo.jpg is a PNG wearing a name tag, and it will be processed as a PNG or rejected as a mismatch. The same goes for every other shortcut of that family: a screenshot saved as PNG does not become a JPG by renaming, and a WebP does not become acceptable by changing its last three letters. Real conversion — decode the old format, encode the new one — takes seconds in any of the tools linked from this guide. Renaming takes the same seconds and changes nothing.

Does the same logic apply to signatures and screenshots?

It does, and it flips the answer. A signature is not a photograph — it is dark lines on white paper, a graphic — so it lives in PNG's homeland: a signature saved as PNG is small, perfectly sharp, and usually well inside its KB band without any fight, while a JPG of the same signature is prone to grey fuzz around the strokes. Screenshots are graphics too, text included, and behave the same way. This is why the format question has no single answer even inside one application form: the photo slot wants JPG, the signature slot is often happiest with PNG, and the candidate who converts everything to one format for tidiness has optimised the wrong thing. Match the format to the kind of image, then match the size to the rule — in that order, every time.

How do you choose in ten seconds?

  • It is a photograph and the form has a size limit: JPG. It is the only format that can always reach the target.
  • It is a graphic, chart, screenshot or logo: PNG. Sharper, and usually smaller than the JPG would be.
  • It needs a transparent background: PNG (or WebP if the form explicitly lists it). JPG has no transparency to give.
  • The form lists accepted formats: obey the list, in its order. The list is the rule.
  • The form lists WebP and the file is a photo for the open web: WebP is fine and efficient — just keep a JPG copy for the next form, which may not take it.
  • A tool offers you a photo as a tiny PNG: ask which promise it broke — size, dimensions or format. One of them is not what you were told.

Formats are not tribes. They are tools with different floors, and a form is a machine that checks numbers. Pick the format whose floor is below the form's ceiling, verify the file's size and dimensions yourself before the form ever sees it, and the upload stops being a lottery and becomes what it should have been all along: a formality you have already passed.

Originally published on CrushKB.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.