filetity

JPG vs JPEG: the same file, and one of them is a 1980s filename limit

They are the same format. .jpg and .jpeg are two spellings of one file format, and the reason there are two is that MS-DOS could not count past three.

The check

Saving one image and copying it to both extensions, on 2026-09-12:

$ cmp a.jpg a.jpeg
                       # no output: not one byte differs

$ file --mime-type a.jpg a.jpeg
a.jpg:  image/jpeg
a.jpeg: image/jpeg

$ xxd -l 4 a.jpg
00000000: ffd8 ffe0

Both files were 33,241 bytes. Both report the same type. Both begin ff d8, which is the marker that says "a JPEG starts here", and carry the letters JFIF at offset 6.

Software does not decide what a file is by reading its name. It reads the first few bytes. The extension is a label for humans and for the desktop's double-click behaviour, and the picture is identified by its contents whatever you call it.

Why two names

The format is named after the committee that wrote it, the Joint Photographic Experts Group, so the natural extension was .jpeg. Then it had to be saved on MS-DOS and early Windows, where a filename was eight characters, a dot, and at most three more. Four letters did not fit, so it was cut to .jpg, exactly as .tiff became .tif and .html became .htm.

Unix and the Mac never had that limit and kept the longer spelling. The limit disappeared in the 1990s; the habits did not. Windows cameras and Windows software mostly still write .jpg, Apple software and a lot of web tooling write .jpeg, and both have been correct the entire time.

So why does anyone need to convert one to the other

Because some upload form is checking the spelling instead of the file. When a job portal, a government form, a print shop or a school system rejects your .jpeg, nothing is wrong with your photo. Somebody wrote a validation rule against a list of extensions and left one out.

The second case is older software that was built when .jpg was the only spelling it expected, and which will not open a file it has decided is unfamiliar. Same problem, same fix.

The fix is a rename, not a conversion

Since the bytes are already identical, going from .jpeg to .jpg means changing the name. You can do that yourself in Finder or File Explorer, and you should, if it is one file and you can see file extensions.

What you should not do is put it through a converter that re-encodes it. JPEG is lossy, and every fresh encode throws away a little more detail permanently. A tool that "converts" JPEG to JPEG by decoding and re-compressing hands you a slightly worse photo for no reason at all, and most of them do exactly that, because re-encoding is the easy thing to implement.

Our JPEG to JPG page renames rather than re-encodes, so the file you get back is the file you put in, to the byte. It exists for the case where renaming by hand is awkward: a folder of two hundred of them, a phone where the extension is hidden, or a work laptop that will not let you install anything.

The questions underneath this one

Which should I save as? .jpg, only because more badly written upload forms accept it. It is not better.

Is one smaller or higher quality? No. Size and quality come from the encoder settings when the picture was saved, and the name is not one of them.

What about JPEG 2000 and JPEG XL? Those are genuinely different formats from the same committee, with their own extensions (.jp2, .jxl) and their own compression. They are unrelated to this question, and neither is what your camera produces.

Can I just retype the extension? Yes, for these two. That is safe precisely because they are the same format. Renaming a .png to .jpg is not the same act and does not work: the bytes stay PNG, and anything strict enough to check will reject it.

filetity is built by Adarsh Mishra. The byte comparison above was run on 2026-09-12 against a JPEG written by macOS; run it on your own file and you will get the same answer. Corrections welcome: support@filetity.com.