Files & identity · Comparison
File Extension vs File Format
This distinction prevents the most common DIY mistake: renaming files to force compatibility. Operating systems may trust the extension; decoders trust the bytes.
Quick take: The extension is a filename hint (.jpg). The format is the real structure of the bytes (JPEG). Conversion changes the format; renaming only changes the hint.
When they disagree
A .jpg that is actually PNG data will confuse viewers. Good tools sniff magic bytes, not only the name.
After a real conversion
Both should update together: JPEG bytes and a .jpg/.jpeg name (plus image/jpeg MIME on the web).
Key points
- Extension = name suffix.
- Format = content specification.
- Never “convert” by renaming alone.
File extension vs File format
File extension
- Part of the filename
- Helps OS pick a default app
- Easy to change — and to fake
File format
- Defined by file contents
- Needs a matching decoder/encoder
- Changes only via real conversion
App rejects the type
Pick: Convert the format
Fix the bytes, then name them correctly.
Icon looks wrong but file opens
Pick: Fix the extension to match
Label mismatch only.
Examples
Wrong
photo.png renamed to photo.jpg.
Right
PNG → JPG conversion exporting real JPEG bytes named photo.jpg.
Try it in a converter
Concepts stick better with a real file — processing stays in your browser.
Related concepts
FAQ
Why do JPG and JPEG both exist?
Historical naming. Same JPEG format family; both extensions are common.
Browse all conversion concepts or jump to converters.