LooIMG

JPEG or JPG: Why One File Has Two Names

JPEG versus JPG looks like a choice between two formats. It is not. Both extensions name exactly the same file, and the reason two spellings exist has nothing to do with quality, size or software support.

Sophie ParkerPublished · Updated · 7 min read

Is JPEG and JPG the same format

They are. JPEG stands for Joint Photographic Experts Group, the committee that wrote the compression standard published as ITU-T T.81 in 1992 and as ISO/IEC 10918-1 in 1994. The format has one name. What you see at the end of a filename is only a label, and that label got shortened along the way.

So there is no JPG standard sitting next to a JPEG standard. There is one standard with two customary spellings for its extension, and any program that opens one opens the other.

You can check this yourself. Take any photo, duplicate it, rename one copy to end in .jpeg and the other in .jpg, then ask your system what each file actually is:

file sunset.jpeg sunset.jpg
sunset.jpeg: JPEG image data, JFIF standard 1.01
sunset.jpg:  JPEG image data, JFIF standard 1.01

One media type, not two. Servers and browsers describe both files with the single registered media type image/jpeg. You sometimes see image/jpg written in tutorials and CMS settings, but it has never been registered with IANA and browsers only tolerate it by accident.

Why does JPEG have two file extensions

Blame MS-DOS. Its FAT filesystem stored a filename as eight characters plus a three character extension, the so called 8.3 format. The natural extension .jpeg was one character too long, so PC software wrote .jpg instead. Macs and Unix systems had no such limit and happily used the full .jpeg.

Windows 95 brought long filenames, and the limit disappeared. The habit did not. By then every Windows imaging program defaulted to .jpg, so the short form became the one most people see.

The same split shows up all over early computing: .htm next to .html, .tif next to .tiff, .mpg next to .mpeg. In each pair the three letter version is the DOS survivor.

Why three characters and not four

In a FAT directory entry the filename was stored as a fixed field of eleven bytes: eight for the name and three for the extension, with the dot implied rather than stored. There was physically nowhere to put a fourth character, so the operating system truncated anything longer. Shorter names such as GIF and PNG already fit.

Difference between JPEG and JPG inside the file

Nothing differs. A JPEG file begins with the same marker bytes whatever it is called, and ends with the same end of image marker. Inside, the picture data is almost always wrapped in a JFIF or Exif structure, which is what holds things like the camera model, the colour information and, on phones, the GPS location.

The extension is part of the filename, not part of the image data. Your operating system uses it as a hint about which app should open the file; browsers ignore it entirely and trust the server's media type and the file's own opening bytes. If you want the fine print, the original specification is public as ITU-T T.81, and the committee still maintains the format at jpeg.org.

ExtensionWhere it comes fromHow common today
.jpgThe name trimmed to three characters for MS-DOSThe default almost everywhere
.jpegThe full name of the standardCommon, accepted by every tool
.jfifNamed after the JFIF container the data sits inRare, sometimes appears when saving images in Windows
.jpeAnother old three character variantVery rare
.jifThe earliest JFIF spellingEffectively obsolete

JPG or JPEG: which extension should you use

Use .jpg, in lowercase, and stay consistent. Nothing breaks if you use .jpeg, but .jpg is what most cameras, phones and editors write by default, so consistency saves you from odd mismatches later in scripts, uploads and image sitemaps.

JPEG vs JPG on web pages and servers

Browsers do not care which one you picked. They read the Content-Type header the server sends and the file's own opening bytes. Every standard web server maps both extensions to image/jpeg out of the box.

Watch the capital letters. Many cameras write IMG_0421.JPG in uppercase. Linux web servers, which run most hosting, treat .JPG and .jpg as different filenames, so a page that points at photo.jpg while the uploaded file is photo.JPG returns a broken image. Rename to lowercase before uploading.

Does the extension change file size or quality

No. What decides size and quality is the encoder setting used when the file was written: the quality value, the chroma subsampling and whether the file is progressive. Push those too far and you get the blocky edges and colour smears explained in our guide to JPEG compression artifacts. Renaming the file touches none of that.

If you actually want a smaller photo, change the encoding rather than the name. Our compressor exposes a quality slider from 10 to 100, sits at 82 by default, and writes progressive JPEGs, so you can trade a little detail for a lot of weight and see the result before you download.

Shrink a JPEG properlyQuality slider, batch support, no signup Open tool

What are .jfif, .jpe and .jif files

All three are JPEG files under a different label. JFIF is the container specification that describes how the compressed data and its basic metadata are packed together, and for a while some software used .jfif as the extension. Windows has been known to save images from a browser this way, which is why the file suddenly refuses to open in an app that only looks at extensions.

The fix is the same as for any of these: rename the file to end in .jpg. The bytes are already correct, so nothing is lost. If an app still complains, run the file through a converter and let it write a clean output.

How to change a .jpeg file to .jpg

Renaming is enough. Because .jpeg and .jpg describe the same format, editing the filename does not touch a single pixel and costs nothing in quality.

Renaming across formats is a different story. Change screenshot.png to screenshot.jpg and the contents are still PNG data wearing the wrong label. Some programs will open it anyway, many will reject it, and anything that trusts the extension will misbehave. That case needs a real conversion, which is what our PNG to JPG converter does.

A few things worth knowing about the converter itself:

  • It accepts both .jpg and .jpeg uploads, along with PNG, WEBP, GIF, HEIC, AVIF, TIFF, ICO and RAW camera files, up to 40 MB per file and 50 files per batch.
  • The target format list has a single JPG entry rather than separate JPG and JPEG entries, for exactly the reason this article exists.
  • Whatever you feed it, JPEG output is named with the .jpg extension, so a batch of mixed .jpeg and .jpg files comes back consistently labelled.
  • Advanced options let you force a colour profile, flatten transparency and strip EXIF metadata before download.

When should you not use JPEG at all

The extension question is settled, but the format question is worth asking. JPEG has no alpha channel, so transparent areas get flattened onto a solid background when you export. It is also lossy, which means every re-save throws away a little more detail.

That makes it a poor fit for logos, screenshots, diagrams and anything with sharp text edges, where PNG or WEBP hold up far better. For a side by side of the options, see our guide to image formats.

Photo files being converted into a single consistently named JPEG output
Image Converter

Stop fighting with file extensions

Drop in a mix of .jpeg, .jpg, .jfif, PNG or HEIC files and get clean JPEG output with consistent names, up to 50 files at a time.

Convert your imagesFree, no signup, files removed after download

Frequently asked questions

Yes. JPEG and JPG are two spellings of one extension for one image format. The files are identical byte for byte and every browser, camera and editor treats them the same. The shorter form exists because MS-DOS allowed only three characters after the dot in a filename.

Either works, but .jpg in lowercase is the safer habit. It is what most cameras and editors write by default, so your filenames stay consistent across uploads, scripts and sitemaps. Avoid uppercase .JPG on web servers, where filenames are case sensitive and a mismatch breaks the image.

No, because there is nothing to convert. Renaming the file changes the label only and leaves the image data untouched. Quality loss happens when an editor re-encodes the picture, which is why repeatedly opening and saving a JPEG degrades it while renaming it a hundred times does not.

JFIF is the container specification a JPEG file uses internally, and some Windows setups pick it as the extension when saving an image from a browser. The file is an ordinary JPEG. Rename it to end in .jpg and it opens normally, or run it through an image converter for a clean output.

Not officially. The registered media type is image/jpeg and it covers both extensions. Browsers often display an image sent as image/jpg anyway, but validators, strict upload filters and some CDNs will reject it, so configure your server or CMS to send image/jpeg.