A JPEG is a photo file format that shrinks image size by removing some detail you usually can't see

A JPEG (pronounced "jay-peg") is a way of storing a photograph or image on your computer so it takes up less space. It does this by throwing away some of the image data — specifically, details your eye is less likely to notice, like tiny variations in color in a smooth sky. The trade-off is that you get a smaller file that loads faster and takes up less storage, but the image is not identical to the original.

JPEG stands for Joint Photographic Experts Group, the committee that created the format back in 1992. You see JPEG files everywhere: photos on websites, pictures you read, images in email. The filename ends in .jpg or .jpeg (both mean the same thing).

The reason JPEG became so common is straightforward math. A photograph taken on a phone or camera can be 5 to 50 megabytes if stored in its raw form. A JPEG version of the same photo might be 500 kilobytes to 2 megabytes. That difference matters when you are uploading to the web, sending files by email, or storing thousands of photos on a phone with limited space.

Key Takeaways

  • JPEG is a compressed image format that makes photo files smaller by removing detail the human eye usually cannot detect.
  • You can control how much compression happens when you save a JPEG — more compression means a smaller file but lower quality.
  • JPEG works well for photographs and complex images but not for graphics with sharp lines, text, or areas of solid color.
  • Once you save a photo as a JPEG and close it, the removed detail is gone forever — you cannot get it back by reopening the file.

How JPEG compression actually works

JPEG compression is lossy, which means it permanently removes data from the image. When you save a photo as JPEG, the software analyzes the image and asks: what details matter least to how this looks? It then discards those details to shrink the file.

The software is good at this because human eyes are better at noticing changes in brightness than changes in color. So JPEG keeps brightness information sharp and throws away some color detail. In a photo of a blue sky, you might lose the ability to see tiny color shifts, but the sky still looks blue and smooth to you.

When you save a JPEG, you usually get a choice of quality level — often a slider from 1 to 100, or "low," "medium," "high." A quality setting of 90 or higher looks nearly identical to the original to most people, while a setting of 60 or lower starts to show visible damage, especially in areas with gradual color changes like skin tones or skies.

When JPEG is the right choice and when it is not

JPEG works best for photographs, especially ones with many colors and natural-looking gradients. A landscape photo, a portrait, a sunset — these all compress well as JPEG because the format is designed for this kind of image.

JPEG is a poor choice for screenshots, diagrams, charts, or images with text. These have sharp edges and areas of solid color, and JPEG compression creates visible blurriness and artifacts (small colored blocks or halos) around the edges. For these, PNG is usually better. JPEG is also not ideal if you plan to edit the image many times, because each time you save it as JPEG, you lose more detail.

If you have a logo, a graphic with text, or a straightforward illustration, PNG or GIF will give you a cleaner result. If you have a photograph and file size matters — which it does for websites and email — JPEG is usually the right tool.

The difference between saving and re-saving a JPEG

This is important: once you save a photo as JPEG, the detail that was removed is gone. If you open that JPEG file, edit it, and save it again as JPEG, you lose more detail a second time. Do this five times and the image quality degrades noticeably.

If you think you might edit a photo later, save your original in a lossless format like PNG or TIFF, or keep the raw file from your camera. Then save a JPEG copy for sharing or uploading. That way, your original stays intact and you can always make a fresh JPEG from it.

Most photo editing software (like Photoshop, GIMP, or even phone apps) will warn you when you are about to save over a JPEG, or will ask you to choose a new filename. Pay attention to that warning — it is there for this reason.

JPEG versus other common image formats

You will run into several image formats, and each has a purpose. Here is how JPEG compares:

FormatBest forFile sizeQuality loss
JPEGPhotographs, complex imagesSmallYes (lossy)
PNGScreenshots, graphics, images with textMedium to largeNo (lossless)
GIFstraightforward graphics, animationsSmallYes, but limited colors
TIFFProfessional photography, archivingVery largeNo (lossless)
WebPWeb images (newer format)SmallYes (lossy)

JPEG is still the most widely supported format across devices and websites. PNG is becoming more common for web use because it handles graphics better. WebP is newer and compresses photos even smaller than JPEG, but not all devices or browsers support it yet.

How to recognize a JPEG and check its quality

A JPEG file will have a filename ending in .jpg or .jpeg. On Windows, you can right-click the file, choose Properties, and see the file type listed. On a Mac, click the file once and press Command+I to open the info panel.

To see the actual dimensions and file size, look at the file properties. A photo that is 3000 pixels wide and 2000 pixels tall might be 2 megabytes as a JPEG at high quality, or 400 kilobytes at lower quality. The bigger the file, the higher the quality usually is (though this is not always true — it depends on how much detail is in the image).

If you open a JPEG in a photo editor and zoom in very close, you might see small colored squares or blurriness, especially in areas with gradual color changes. This is the compression at work. At normal viewing size, you usually will not notice it.

Frequently Asked Questions

Can I convert a JPEG back to its original quality if I saved it at low quality?

No. Once a JPEG is saved, the removed detail is gone permanently. Converting it to another format or using software to "enhance" it cannot bring back what was discarded. You would need the original file from your camera or device.

Why do websites use JPEG instead of PNG?

JPEG files are much smaller than PNG for photographs, which means pages load faster and use less bandwidth. For a photo, JPEG at high quality is usually smaller than PNG while looking nearly identical. PNG is better for graphics and images with text, but for photos, JPEG wins on file size.

Is JPEG safe to use for important photos I want to keep forever?

Not as your only copy. JPEG is fine for sharing and viewing, but if you want to preserve a photo long-term, keep the original file from your camera (usually RAW or TIFF format) or save a PNG copy. JPEG is best used for distribution, not archiving.

What quality setting should I use when saving a JPEG?

For most purposes, a quality setting of 80 to 90 looks excellent and keeps file size reasonable. For web use, 75 to 85 is often enough. For printing, aim for 90 or higher. Anything below 60 usually shows visible damage unless the image is very small.

Can I tell if a photo was heavily compressed just by looking at it?

Sometimes. Look for blurriness around sharp edges, visible colored blocks (especially in smooth areas like skin or sky), or a general "soft" appearance. These are signs of heavy JPEG compression. High-quality JPEGs look nearly identical to the original and are hard to distinguish without zooming in.