Image guidesPractical guides

Why renaming an image to .jpg is not conversion

Renaming photo.png to photo.jpg changes its name, not its PNG encoding. For an upload that requires JPEG, export a new JPEG from an image editor, then inspect the downloaded file. If it still fails, diagnose the receiving platform’s other conditions separately.

A hand holds a memory card beside a camera and laptop, illustrating image files and encoding
Illustrative photo: Samsung Memory US · Unsplash LicenseStock photograph; not a tool screenshot, product test or announcement event.

Key Takeaways

Keep the original, confirm it opens, and explicitly re-encode a copy as JPEG. Its extension should agree with the output, but the name alone proves nothing. The opaque 80×60 teaching image below isolates encoding from size, transparency and platform approval.

In this article

Separate the three meanings of “type”

A filename is a label; the content contains the information a decoder needs. File.type or Blob.type is another observation, not a reliable inspection of those bytes. MDN’s Blob.type documentation explains that browsers may infer the reported type from the extension and warns against using it as the sole validation.

Consequently, a .jpg name, an image/jpeg label and genuine JPEG content are different claims. A tolerant viewer opening a wrongly named file does not establish that an upload service will accept it. Preserve the original rather than repeatedly overwriting it.

What each observation establishes
ObservationWhat it tells youWhat it cannot establish alone
Filename ends in .jpgThe current extensionThat re-encoding happened
File.type is image/jpegThe media-type label providedValid bytes meeting the recipient’s rules
Viewer opens the imageThat viewer can decode itCompatibility or approval everywhere
New export inspectedA separate output was generatedGuaranteed upload acceptance

Make a small control image

Create an opaque, non-sensitive 80×60 PNG, such as simple colored blocks. Save source.png, then duplicate it as renamed.jpg without opening and resaving it in an editor. The copies should have identical byte lengths and content hashes; the dimensions remain 80×60.

This is an original teaching control, not a customer file or a documented platform rejection. A PNG commonly begins 89 50 4E 47 0D 0A 1A 0A, while JPEG normally starts FF D8. Signatures help spot obvious mismatches; they do not replace decoding, security checks or full validation. You need not install a hex editor to follow the practical route. The WHATWG image-type pattern table lists these signatures.

Two routes, different expected results

Rename control

source.png → duplicate as renamed.jpg Bytes unchanged: still PNG content.

Actual conversion

source.png → choose JPEG in an editor → download converted.jpg New JPEG content; inspect dimensions separately.

Re-encoding is the difference. A lossy JPEG need not match the PNG pixel for pixel or share its hash, and it is not guaranteed to be smaller.

Export once and inspect the downloaded copy

Add the original PNG to image format conversion and explicitly select JPEG. The page may retain previous settings; seeing a preview does not confirm the selected format. Check crop, resize and background options, keeping this example at 80×60 with an opaque background, then apply settings and generate the preview.

Download the actual result under a new name. Reopen it and verify that it decodes, has an appropriate extension, remains 80×60 and retains the intended blocks without clipping. If you receive a ZIP, extract and inspect the image inside rather than renaming the archive for upload.

Use the format-selection guide to decide whether JPEG is appropriate. For transparency, choose a background deliberately; the PNG-to-JPEG background check handles that separate issue. This control is opaque so it does not confound the diagnosis.

If a real JPEG still fails, isolate the next condition

Read the recipient’s current requirements for format, bytes, minimum dimensions, aspect ratio and account access. Retry with the downloaded control. If that succeeds while the original does not, compare their dimensions and sizes. One accepted control does not imply acceptance of every JPEG.

Change quality or dimensions only after identifying a relevant limit. Correct the canvas for an aspect-ratio error; retain the actual message for an account or network problem. Changing format, size, account and browser simultaneously makes the cause harder to identify.

MDN’s format reference documents common extensions and media types, not the acceptance rules of a recruitment site, seller portal or school. KitNelo cannot approve an upload on those services.

Inspect the delivered file

  • Retain the PNG master and save conversion separately.
  • Confirm new encoding, successful decoding and a matching filename.
  • Check dimensions, ratio, background and visual content independently.
  • Record upload success only after the actual recipient accepts it; conversion is not approval.

Further reading & sources

Put the guide into practice

Open the relevant tool, preview the result and check your exported file.