The one-sentence answer

JPG and JPEG are exactly the same image format. Same codec, same compression, same file structure, same bit-for-bit output. You can rename either extension without losing a single byte of information. The difference is purely historical.

Where the two names come from

The codec itself is called JPEG — short for Joint Photographic Experts Group, the committee from ISO and CCITT (today ITU-T) that developed the standard between 1986 and 1992. The final specification was published in 1992 as ISO/IEC 10918-1.

So "JPEG" is the official format name. Then why do so many files end in .jpg? Blame MS-DOS and the old FAT file system. Until Windows 95, FAT only accepted filenames in 8.3 format — a maximum of eight characters for the name, three for the extension. A .jpeg extension would have been four characters — one too many. So Microsoft shortened it to .jpg.

Unix worlds and later macOS never had this restriction and kept using .jpeg. Linux image libraries (libjpeg) treat both extensions identically. Adobe Photoshop eventually switched to .jpg because 99% of its users came from the Windows world.

Which spelling should you use today?

Functionally, it doesn't matter. Every modern operating system, every browser, every image viewer and every CMS treats .jpg and .jpeg identically. You can rename a foto.jpeg file to foto.jpg, upload it, rename it back — zero data loss.

A few conventions that have stuck in practice:

  • .jpg — the de facto standard. Smartphones, cameras, Photoshop, and every major social media platform export this way. When in doubt: .jpg.
  • .jpeg — often used in academic or formal contexts because it matches the official standard name. Rare in day-to-day web work.
  • .jpe — a very rare third variant that appeared in some DOS tools. Practically extinct.

📜 Historical detail: The JPEG specification itself defines no file extension at all. That's purely an operating-system convention. A JPEG file is detected by its first two bytes: FF D8 (Start of Image marker). That's the "magic number" fingerprint every image program checks — the extension is only a hint for humans and file explorers.

What every JPG/JPEG variant has in common

Regardless of the extension, every JPEG file shares:

  • Lossy compression — the format breaks the image into 8×8 pixel blocks, transforms them via DCT (Discrete Cosine Transform) into frequency coefficients, and quantizes away the high-frequency components the eye perceives poorly
  • 24-bit color depth — up to 16.7 million colors per pixel
  • No alpha channel — no transparency, ever (myth: some converters save transparent images as JPEG with a white background fill)
  • Optional EXIF metadata — camera info, GPS, timestamps, sometimes preview thumbnails
  • Progressive vs. baseline — baseline renders line by line, progressive in multiple sharpness passes (on slow connections, users see a rough version of the image earlier)

Common myths about JPG/JPEG

Myth 1: "JPEG is the original file, JPG is the compressed version." No. Both are identical.

Myth 2: "JPG has worse quality than JPEG." No. Quality is determined by the quality value used during encoding (typically 0–100), not by the extension.

Myth 3: "JPEG supports transparency, JPG doesn't." Both wrong — JPEG (whichever extension) has never supported transparency. If you need transparency, use PNG, WebP or AVIF.

Myth 4: "Apple always saves as JPEG, Windows as JPG." Outdated. Since 2017 iOS exports .HEIC by default; since Windows 11, Windows largely uses JPG. Both worlds accept both extensions.

What to do if the extension causes problems

Some legacy software only recognizes one of the two — typical suspects are old email clients, early CMS installations, industrial software from the 2000s. If a system rejects a .jpeg file, just rename to .jpg:

  • macOS — select file, press Enter, change extension, confirm
  • Windows — right-click → Rename, change extension (if the extension isn't visible: Folder Options → uncheck "Hide extensions for known file types")
  • Batch — on the command line: for f in *.jpeg; do mv "$f" "${f%.jpeg}.jpg"; done

Renaming changes nothing about the file — no re-compression, no quality loss. It's only a new name for the same byte sequence.

Related formats often confused with JPEG

  • JPEG 2000 (.jp2, .j2k) — successor spec from the year 2000. Wavelet-based instead of DCT, theoretically better, but patents and lack of browser support kept it out of the web.
  • JPEG XR (.jxr) — Microsoft variant from 2009. Only spread in Internet Explorer and a few print workflows.
  • JPEG XL (.jxl) — the most modern variant (2021), royalty-free, significantly more efficient than classic JPEG. Chrome removed support in 2022; Safari and Firefox support it experimentally.

These three are not the same as JPG/JPEG. They use different codecs and aren't backward-compatible.

Conclusion

JPG and JPEG are identical. The two extensions are a DOS legacy from the 1980s and have no impact on content, quality or compatibility. For modern web content, take .jpg — it works everywhere — and stop thinking about it. For more efficient compression, look at WebP or AVIF.