Your files are never uploaded — everything runs in your browser.
6 min read · Updated:

Changing a file extension is not converting

Renaming photo.heic to photo.jpg changes only the label, not the data inside. Here is why that breaks uploads, how to find a file's real format, and how to convert it properly.

It is a tempting shortcut. A website accepts only JPG, your photo is a HEIC or a WebP, so you rename it to end in .jpg. Sometimes the upload even goes through. But the file has not changed at all, and sooner or later a program or a person on the other end will be unable to open it.

What an extension really is

The extension is the part of a file name after the last dot, such as .jpg, .png or .pdf. It is a label that helps your operating system decide which program should open the file and which icon to show. It is not part of the image data.

The actual format is defined by how the bytes inside the file are arranged. A HEIC photo is HEVC-compressed image data inside a HEIF container. A JPG is image data compressed with the JPEG method. Renaming the file changes the label but leaves every byte untouched, so the content is still HEIC.

Converting is a different process. A converter decodes the image into pixels, then encodes those pixels again in the new format. The result is a new file with completely different bytes.

File signatures: how programs recognize formats

Most file formats begin with a fixed sequence of bytes, called a file signature or magic bytes. Programs that check content read these first bytes to find out what the file really is, regardless of its name.

FormatTypical start of the file
JPGBytes FF D8 FF
PNGBytes 89 50 4E 47 0D 0A 1A 0A, which contain the letters PNG
GIFThe text GIF87a or GIF89a
WebPThe text RIFF, then four size bytes, then WEBP
HEIC and AVIFAt byte 4, the text ftyp, followed by a brand such as heic, mif1 or avif
BMPThe text BM
TIFFII* followed by a zero byte, or MM followed by a zero byte and *
PDFThe text %PDF
ICOBytes 00 00 01 00
SVGNo binary signature; it is text that usually starts with <?xml or <svg

So when you rename photo.heic to photo.jpg, any program that reads the first bytes will see a HEIF file, not the FF D8 FF that a JPG must start with.

What happens when a renamed file is opened

Programs handle mismatches in different ways, which is why the shortcut sometimes seems to work.

  • Some programs check the content and open the file anyway. Many image viewers and web browsers do this. The file opens on your computer, which makes it look like the renaming worked.
  • Some programs trust the extension. They try to read the file as a JPG, fail, and show an error such as file damaged or unsupported format.
  • Some upload forms only check the name. The upload succeeds, but the receiving system or the person reviewing your application cannot display the file. You may only find out much later.
  • Other upload forms check the content and reject the file immediately, even though the name ends in .jpg.

The fact that a file opens on your own device does not prove it is the format its name claims.

When renaming is harmless

Some extensions are simply different names for the same format, and renaming between them is fine:

  • .jpg, .jpeg and .jfif are all JPEG files.
  • .tif and .tiff are the same format.
  • .heic and .heif are closely related, and most programs that open one open the other.

Renaming across actual formats, such as HEIC to JPG, WebP to PNG or PNG to ICO, never converts anything.

Hidden extensions make it worse

Windows hides known file extensions by default. A file that looks like photo.jpg might really be named photo.jpg.png, and a file shown as photo might be a HEIC. Before renaming anything, make extensions visible.

  • Windows 11: in File Explorer, open View, then Show, and turn on File name extensions.
  • Windows 10: in File Explorer, open the View tab and tick File name extensions.
  • macOS: in Finder, open Settings (called Preferences in older versions), go to Advanced and turn on Show all filename extensions.

How to find the real format

The image size checker detects the real format from the file content, not from the name, and flags files whose extension does not match. It also shows the dimensions, file size and other details, and it works on many files at once.

This is especially useful for downloaded images. Many websites deliver WebP images even when the address ends in .jpg, because they choose the format based on what your browser supports. When you save such an image, you may end up with WebP data in a file called .jpg, or with a .webp file you did not expect.

How to convert properly

  1. Make extensions visible, as described above.
  2. Check the real format with the image size checker.
  3. Convert the file with the tool that matches its real format (see the list below).
  4. Check the converted file with the image size checker before you upload it.

Which converter to use:

The converters run in your browser, so your photos stay on your device during the whole process. For more about the formats involved, see the HEIC, JPG and WebP format pages, and the guide to HEIC for iPhone-specific settings.

Frequently asked questions

Is a .jpeg file different from a .jpg file?

No. Both extensions mean the same JPEG format. The shorter .jpg comes from older systems that limited extensions to three letters. You can rename between them safely.

Can renaming damage my file?

No. Renaming does not change the data, so you can always rename the file back. The only risk is that programs may refuse to open it while the name is wrong.

Why does my photo open on my computer but the website rejects it?

Your image viewer probably reads the file content and ignores the wrong extension, while the website checks the content and sees a different format. Convert the file instead of renaming it.

Why did an image I saved from a website turn out to be WebP?

Many sites send WebP to browsers that support it, even when the image address ends in .jpg. Convert it with the WebP to JPG converter if you need a real JPG.

More guides