ESExactSizeTool

"Invalid file format" — why renaming the file to .jpg does not work

Portals read the bytes inside the file, not the extension on the end of its name. A PNG renamed to .jpg is still a PNG. Here is how to actually convert it.

The file extension is just the last few characters of the name. It is a hint for your operating system, nothing more. Inside, every image format starts with its own signature — a JPEG begins with the bytes FF D8 FF, a PNG with 89 50 4E 47 — and that is what a portal reads. Renaming photo.png to photo.jpg changes the label on the box and nothing inside it.

Where the wrong format comes from

Screenshots. On most phones and on Windows, a screenshot is saved as PNG. People crop a photo by screenshotting it, and the result is a PNG with a .png name at whatever size the screen happened to be.

iPhone photos. Recent iPhones save in HEIC by default, which almost no Indian exam portal accepts. It often looks like a normal photo on the phone and fails the moment it is uploaded.

WhatsApp and downloads. A picture that has been through a chat app or downloaded from a web page can arrive in WEBP, which portals reject.

Converting properly

Use a converter that re-encodes the picture rather than one that renames it. PNG to JPG and WEBP to JPG both produce a genuine JPEG at the original dimensions. If the picture also needs a specific size, the exam photo resizer outputs JPEG anyway, so resizing and converting happen together.

One thing to know about converting from PNG: PNG supports transparency and JPEG does not. Anything transparent becomes white in the JPEG, which is normally what you want for a signature on paper and occasionally a surprise for a logo.

Checking what you actually have

The rejection checker reads the signature bytes at the start of your file and reports the real format, regardless of what the name says. If you are not sure whether your file is genuinely a JPEG, that is the quickest way to find out.

☕
These tools are free, and they stay free. No account, no daily limit, nothing uploaded. If this saved you a deadline, you can buy me a coffee.
Buy me a coffee

Questions

Is JPG different from JPEG?

No. They are the same format. The three-letter version exists because older versions of Windows only allowed three-character extensions. A portal asking for JPG accepts a .jpeg file and the reverse.

How do I stop my iPhone saving HEIC?

In Settings, open Camera, then Formats, and choose Most Compatible. Photos taken after that are JPEG. Photos already taken stay HEIC and still need converting.

Does converting PNG to JPG lose quality?

A little, because JPEG is lossy. At the quality levels used for exam uploads it is not visible, and the file is far smaller, which is normally what the form wants anyway.

Can I upload a PDF instead?

Only where the form asks for one. A photograph field expecting JPEG will refuse a PDF even if the picture inside it is correct.

Other upload errors