Quick Verdict
Use JPG when…
Use .jpg — it's shorter and more common. Windows, macOS, and most cameras default to .jpg. Most web servers serve both identically.
Use JPEG when…
Use .jpeg if a specific tool, CMS, or API explicitly requires it, or if you're on a system that historically used .jpeg. The file content is identical.
JPG vs JPEG: Feature Comparison
| Feature | JPG | JPEG |
|---|---|---|
| File format | JPEG compression | JPEG compression (identical) |
| File content | Identical to .jpeg | Identical to .jpg |
| Extension length | 3 characters (MS-DOS compatible) | 4 characters |
| Camera default | Most cameras use .jpg | Some cameras use .jpeg |
| Web standard | More common on the web | Less common but valid |
| macOS default | Preview saves as .jpg | Some tools use .jpeg |
| MIME type | image/jpeg | image/jpeg (same) |
| Can rename safely? | Yes — renaming .jpg to .jpeg is safe | Yes — renaming .jpeg to .jpg is safe |
When JPG wins
- ✓File format: JPEG compression
- ✓File content: Identical to .jpeg
- ✓Extension length: 3 characters (MS-DOS compatible)
When JPEG wins
- ✓File format: JPEG compression (identical)
- ✓File content: Identical to .jpg
- ✓Extension length: 4 characters
The short answer
JPG and JPEG are the same format. Same compression, same internal structure, same decoder. Rename photo.jpeg to photo.jpg and nothing about the file changes — not one byte of image data. There is no quality difference, no size difference, and no situation where one is technically better than the other.
If that is all you needed, you are done. The rest of this page covers why two extensions exist, and the handful of real situations where the choice between them actually causes problems.
Why two extensions exist
The format is properly called JPEG, after the Joint Photographic Experts Group that standardised it. That is four characters — and early versions of MS-DOS and Windows used the FAT file system, which allowed filenames of eight characters plus a three-character extension. Four did not fit, so Windows software wrote .jpg.
Unix and classic Mac systems had no such limit and used .jpeg freely. The 8.3 restriction disappeared decades ago, but by then both conventions were entrenched in software defaults, camera firmware and muscle memory. Neither ever won, which is why you still see both today.
The same story explains other doubled extensions you may run into: .tif and .tiff, .htm and .html. Same file, shortened name, same historical cause.
Where the difference actually bites
Although the files are identical, the strings are not — and software compares strings. These are the cases where it matters:
Case-sensitive servers. Linux web servers treat photo.JPG and photo.jpg as different files. An image that works locally on Windows or macOS can 404 in production purely because of the case of the extension. This is one of the most common causes of images that mysteriously break only after deploy.
Upload validators. Some forms accept .jpg and reject .jpeg, or the reverse, because someone wrote the allow-list by hand and forgot one. If an upload is refused, renaming the extension is the first thing to try — it works surprisingly often.
Scripts and glob patterns. A batch job matching *.jpg silently skips every .jpeg file in the folder. Nothing errors; the files are just quietly missed. Match both, or normalise the folder first.
Duplicate detection. Tools that key on filename see holiday.jpg and holiday.jpeg as two different images, so genuine duplicates survive a de-dupe pass.
Which one should you use?
Use .jpg, lowercase, unless something specifically requires otherwise. It is the more common default, it is shorter, and lowercase avoids the case-sensitivity trap entirely.
Consistency matters more than the choice itself. Pick one convention for a project and normalise everything to it — mixed extensions across a folder or a codebase are what create the glob and de-dupe problems above.
For the web specifically: lowercase .jpg, and keep the extension consistent with what your build pipeline and CDN expect.
Renaming vs converting
Because the formats are identical, changing between .jpg and .jpeg is a rename, not a conversion. Nothing needs to be re-encoded, and nothing should be — re-saving a JPEG discards a little more detail every time, because the compression is lossy. Renaming avoids that entirely and takes no time.
You only need a real conversion when moving to a different format: JPG vs PNG if you need transparency or lossless quality, or JPG vs WebP if you want the same photo at a smaller file size for the web. If you are re-saving JPEGs repeatedly, our guide to compressing images without losing quality explains how generation loss accumulates and how to avoid it.
What about JPEG 2000, JPEG XL and progressive JPEG?
These are genuinely different things, and they are worth separating from the .jpg/.jpeg question.
Progressive JPEG is still ordinary JPEG — the same format, encoded so the image loads in increasingly sharp passes rather than top to bottom. It is a save option, not a different file type, and it usually carries a .jpg extension like any other.
JPEG 2000 (.jp2) and JPEG XL (.jxl) are separate formats from the same standards body. They are not interchangeable with JPEG, they need their own decoder support, and browser support differs considerably. Renaming will not turn one into the other.
Frequently asked questions
Can I rename .jpg to .jpeg or vice versa?
Why does my camera save as .JPG instead of .JPEG?
Does a web server care if an image is .jpg or .jpeg?
Ready to convert?
Free, browser-based converters — no upload, no signup required.
Related comparisons
More comparisons
View all format comparisons →