JPG vs JPEG: is there a difference?
Updated November 12, 2026
There is no difference in the image itself: JPG and JPEG are two file extensions for one format, the JPEG standard from 1992. The shorter .jpg goes back to MS-DOS and early Windows, which allowed only three letters after the dot. Renaming a file from one ending to the other changes nothing but its name.
In short
- Files ending in .jpg and .jpeg hold the same kind of data and share one media type, image/jpeg.
- The three-letter .jpg comes from old file systems that allowed three characters after the dot, and it is the ending used most often.
- You can rename a .jpeg file to .jpg, or the other way around, without converting it.
- A converter is only needed when the image is in another format, such as PNG, HEIC or WebP.
- A real JPEG holds a picture, not a program, but a camera photo can carry its location with it.
Try it right here
Are JPG and JPEG the same format?
Yes. JPEG is a way of storing compressed photos, and .jpg and .jpeg are two labels for files that use it. MDN Web Docs, a reference for web developers, describes JPEG as a data format for compressed photos rather than a file type. The ending on the file name only tells your computer which kind of data to expect.
The official registry says the same. IANA, the organization that keeps the list of media types used on the internet, registers a single type for these files, image/jpeg, and lists both jpg and jpeg as its extensions. A media type is the label a browser or server uses to recognize what kind of file it receives. This one was defined in November 1996.
A few rarer endings belong to the same family. MDN also lists .jpe, .jif and .jfif for image/jpeg. If you come across a picture ending in .jfif, it is a JPEG file with a less familiar name. JFIF, short for JPEG File Interchange Format, is defined in part 5 of the JPEG standard, and these files are still registered under image/jpeg.
Why two file endings exist
The name came first. JPEG stands for Joint Photographic Experts Group, the committee that wrote the standard in 1992. The word Joint refers to the committee's collaboration with the International Telecommunication Union (ITU).
The short ending came from the computers of that era. The old MS-DOS FAT file system allowed a file name of at most eight characters plus an extension of at most three. Windows 3.1 ran on MS-DOS and inherited that limit, so a four-letter .jpeg was not possible there and JPEG files were named .jpg.
The rule ended with Windows 95 and Windows NT 3.5. The Windows FAT and NTFS file systems support long file names, so .jpeg works fine on them.
The habit outlived the limit. People kept using .jpg as the standard ending for JPEG files after Windows 3.1 was gone, and the Library of Congress notes that jpg is the extension used most often. That is why you will usually see .jpg, even though the full name of the format has four letters.
The two endings side by side
Put next to each other, .jpg and .jpeg differ only in the rows that are about the name: how many letters the ending has, whether MS-DOS and Windows 3.1 accepted it, and how often you see it. Inside, both start with the same bytes: IANA lists FF D8 FF as the first bytes of a JPEG file, whatever its name says.
You may read that a .jpg keeps more quality or takes more space than a .jpeg. That mixes up the ending with the compression. The size and the look of a JPEG depend on how strongly it was compressed when it was saved, and the ending plays no part in that. Two files saved from the same picture with the same settings contain the same data, whichever ending they carry.
Older versions of Internet Explorer even sent JPEG uploads with a different label, image/pjpeg, instead of image/jpeg. Only the label differed, and the images were still JPEG.
| .jpg | .jpeg | |
|---|---|---|
| Image format | JPEG | JPEG |
| Media type | image/jpeg | image/jpeg |
| Letters after the dot | 3 | 4 |
| Allowed on MS-DOS and Windows 3.1 | Yes | No |
| How common | Used most often | Less common |
| Renaming to the other ending | Changes only the name | Changes only the name |
Can I just rename JPG to JPEG?
Yes. Since both endings mean the same format, renaming is all it takes when a website or an app insists on one of them. Microsoft states that changing a file name extension does not convert the file and leaves everything except the name as it was.
If Windows shows the file name without its ending, make the extensions visible first. In Windows 11:
- Open File Explorer and go to the folder with the photo.
- Select View > Show > File name extensions.
- Rename the file and change the ending from .jpeg to .jpg, or from .jpg to .jpeg.
- Open the renamed file to check that it still shows the picture.
- On other systems the menus differ, but the rule is the same: change only the letters after the last dot.
- Rename only between JPEG endings: turning photo.png into photo.jpg leaves PNG data inside a file that claims to be a JPEG, because the name is the only thing that changes.
When you need a converter instead
A converter is for images that are not JPEG yet, such as PNG screenshots, HEIC photos or WebP images. For a PNG, you can convert PNG to JPG in your browser on this site. The result gets the .jpg ending and the image/jpeg media type, and the converter also accepts JPEG files ending in .jpg, .jpeg, .jfif or .jpe.
For a .jpeg file, the converter is the longer route and not a better one. It drops the old ending, so photo.jpeg comes out as photo.jpg, but it gets there by compressing the picture again in your browser, at a default quality of 92%. Each new JPEG compression can lose some detail, so renaming is the cleaner way to change the ending.
The conversion runs in your browser. The site's security rules let the page connect only to its own address, so it cannot send your pictures to an outside server.
Is a .jpg file safe to open?
A real JPEG is a picture, not a program. The IANA registration says a JPEG holds image data and metadata, and neither of them is executable in itself.
The risk lies in files that only pretend to be images, such as a program named photo.jpg.exe. The last ending is the one that counts, so turn on File name extensions, as in the steps above, to see the full name before you open anything. If a file you took for a photo asks for permission to run, cancel and delete it.
The other thing to know is what a photo can tell about you. Most cameras that save JPEG actually write the Exif format, which adds details from the camera to the picture. IANA warns that this Exif data may include privacy-sensitive information such as location. Check or remove those details before you post a photo publicly if you would rather not share where it was taken.
Questions? Answers.
What is the difference between JPG and JPEG?
The only difference is the ending of the file name: three letters or four. Both endings belong to the same JPEG format and share the media type image/jpeg. The shorter .jpg exists because MS-DOS and early Windows allowed no more than three characters after the dot, and it stayed the most common ending afterward.
How do I convert JPG to JPEG?
Rename the file and change its ending from .jpg to .jpeg. No conversion is needed, because both endings name the same format and Microsoft confirms that a new extension changes only the file name. If the ending is hidden in Windows 11, select View > Show > File name extensions in File Explorer first.
Which is newer, JPG or JPEG?
Neither is a newer version of the format, since both endings refer to the JPEG standard from 1992. The short .jpg became the habit on MS-DOS and Windows 3.1, which allowed only three letters after the dot. The longer .jpeg spells out the format's name and works on Windows since Windows 95 and Windows NT 3.5.
JPEG vs JPG: which has better quality?
Neither, because quality is not tied to the ending. A JPEG looks as good as the compression chosen when it was saved. Renaming a .jpeg file to .jpg, or back, keeps the image data exactly as it was, so the picture looks the same and the file size does not change.
Why does my picture end in .jfif?
A .jfif file is a JPEG with a less common ending. JFIF, the JPEG File Interchange Format, is defined in the JPEG standard, and these files are still registered under the media type image/jpeg. If a website rejects the .jfif ending, rename the file to .jpg, because the data inside is already JPEG.
Sources
The facts in this guide are checked against these sources.
- JPEG 1 (JPEG committee)
- About JPEG (JPEG committee)
- Media type registration: image/jpeg (IANA)
- Image file type and format guide (MDN Web Docs)
- JPEG (Wikipedia)
- JPEG File Interchange Format (Wikipedia)
- Naming Files, Paths, and Namespaces (Microsoft)
- 8.3 filename (Wikipedia)
- Why JPG and not JPEG? (catcode.com (Guide to Images))
- JPEG File Interchange Format, Version 1.02 (Library of Congress)
- Common file name extensions in Windows (Microsoft)