Renaming .webp to .jpg Doesn't Work — Here's Why

September 6, 2026 · 5 min read

You downloaded an image, it came out as photo.webp, and something will not accept it. So you rename it to photo.jpg and try again.

It does not work. Depending on what you feed it to, you get "file is not a valid image", a blank thumbnail, or a program that opens the file and then crashes. Sometimes it appears to work in one place and fails in another, which is more confusing still.

The reason is simple once you see it, and it applies to every image format — WebP, HEIC, PNG, AVIF, all of them.

The extension is a label, not the contents

A filename has two parts: the name and the extension after the dot. The extension is a hint to the operating system about which program should open the file. That is all it is. It is metadata about the file, not part of the file's data.

Renaming photo.webp to photo.jpg changes the label on the box. The contents of the box are untouched. Every byte inside the file is still WebP-encoded data, arranged the way WebP arranges it.

So when a program opens your renamed file expecting JPEG structure, it finds something else entirely and gives up.

What is actually inside the file

Image files begin with a few bytes that identify the format. These are called the file signature, or magic number, and they exist precisely so software does not have to trust the filename.

  • JPEG starts with FF D8 FF
  • PNG starts with 89 50 4E 47, which reads as .PNG in text
  • WebP starts with RIFF, then four size bytes, then WEBP
  • GIF starts with the literal text GIF87a or GIF89a
  • HEIC has ftypheic a few bytes in

Any program that reads these bytes knows immediately what it is holding, whatever the filename claims. That is why renaming fails: you changed something the software was never looking at.

You can see this yourself. Open a .jpg in a plain text editor and the first line begins with characters that are not readable text but are consistent across every JPEG on your machine. Rename it to .png and those bytes do not change.

Why it sometimes seems to work

This is where people get misled into thinking renaming is a valid trick.

Some software trusts the extension and some reads the header. Browsers read the header, which is why a mislabelled image often still displays on a web page. Windows Photos is fairly tolerant. Older desktop applications and most upload validators check the header strictly and reject anything that does not match.

So you rename a file, it opens fine on your computer, you send it to someone, and it fails at their end. The file was broken the whole time — you just tested it with software that happened to be forgiving.

There is a variation of this doing the rounds as a tip for sending photos through messaging apps at full quality: rename the image to .pdf so the app treats it as a document and skips compression. It technically moves the bytes across intact, but the recipient receives a file their phone cannot open until they rename it back, and most people will not know to do that. It is a bad recommendation, and you will see it repeated in a lot of articles.

What conversion actually involves

Converting is not renaming. It is two real steps:

Decode. Read the compressed data and reconstruct the actual grid of pixels — the colour values for every point in the image.

Re-encode. Take that pixel grid and compress it again using the rules of the target format, then write a new file with the correct header.

This is why conversion takes a moment rather than being instant, and why it can affect quality. Going from one lossy format to another means the image is compressed twice, so a small amount of detail is discarded each time. Going to a lossless format like PNG avoids further loss but produces a much larger file.

It is also why converting cannot restore anything. If the source was already compressed heavily, the detail is gone and no target format brings it back.

How to actually convert

Any real converter does the decode and re-encode for you. If your file is a HEIC from an iPhone, our HEIC to JPG converter handles a whole batch at once, in your browser, with nothing uploaded. If the converted result is also too large for wherever it is going, run it through the compressor afterwards.

On a desktop, opening the image in any editor and using Save As or Export with a different format selected does the same job. Preview on macOS, Paint or Photos on Windows, GIMP anywhere. What matters is that the program is writing a new file rather than relabelling the existing one.

How to tell if a file has been renamed

If you have been sent a file that will not open, check whether its extension matches its contents.

On macOS or Linux, the file command reports the real format regardless of name. On Windows, opening the file in an image editor and checking what it reports usually gives it away. Any hex editor shows the signature bytes directly.

If the extension says one thing and the header says another, someone renamed it. Converting it properly will fix it.

The short version

The extension tells your operating system which program to try. The bytes inside tell that program what the file actually is. Renaming changes only the first one, so the file stays exactly as incompatible as it was — it just fails in a more confusing way. Convert it instead, which means decoding the image and writing a genuinely new file in the format you need.

Tools used in this guide