What Is JPEG? How JPEG Compression Works and When to Use It
If you have ever taken a photo, downloaded a picture, or attached an image to an email, you have almost certainly used a JPEG file, even if you did not notice the letters at the end of its name. So what is JPEG? It is one of the most common image formats in the world, designed to make photographs small enough to store, share, and load quickly on the web, without making them look noticeably worse.
JPEG stands for the Joint Photographic Experts Group, the committee that created the format in the early 1990s. A JPEG file usually ends in .jpg or .jpeg. In this guide, we explain what is JPEG, how its lossy compression works in plain words, how it differs from PNG and WebP, when to use it, when to avoid it, and how to open and convert JPEG files.
What Is JPEG?
JPEG is a format for storing digital images, especially photographs. It is best known for compression: it shrinks a photo to a much smaller file size than an uncompressed image would need. That is why cameras, phones, websites, and social media apps use JPEG so widely. A photo that might take tens of megabytes uncompressed can often be stored as a JPEG of only a few megabytes, or even a few hundred kilobytes, while still looking good on a screen.
JPEG files are made for pictures with many colors and smooth changes in tone, such as skies, skin, landscapes, and everyday snapshots. They are less suited to images with sharp lines, flat colors, and text, such as logos and screenshots, where another format may preserve edges more cleanly. To understand why, it helps to know how JPEG compression works.
It is also useful to know that JPEG is a file format, not a program. You do not need special software to use it. Almost every photo viewer, web browser, phone, and image editor can open a JPEG. If you want a broader explanation of how file types work, see our guide to what is a file extension.
How Lossy Compression Works in Plain Words
JPEG uses lossy compression, which means it deliberately throws away some image information to save space. That sounds alarming, but it is based on a simple idea: human eyes do not notice every tiny detail in a photograph, especially in busy areas or subtle color changes. JPEG removes much of that least noticeable detail first.
In simplified terms, JPEG breaks an image into small blocks, usually 8 by 8 pixels. For each block, it looks at brightness and color separately. Our eyes are more sensitive to brightness than to exact color, so JPEG keeps brightness detail more carefully and simplifies color information more aggressively. It then rounds off fine detail and stores the result in a compact form.
When you save a JPEG, you usually choose a quality setting, often on a scale from low to high. A high quality setting keeps more detail and makes a larger file. A low quality setting discards more detail and makes a much smaller file, but the picture can start to look blocky, blurry, or blotchy, especially around edges. Those visible artifacts are the cost of heavy compression.
Lossy also means the loss is permanent. Once detail is discarded and the file is saved, opening the JPEG again does not restore it. That is why repeatedly editing and re-saving the same JPEG can gradually reduce quality: each save can discard a little more. For this reason, photographers often keep an original, less compressed copy for editing, and export a JPEG only as the final, shareable version.
JPG vs JPEG: Is There Any Real Difference?
No, there is no real difference between JPG and JPEG. They are the same format. The shorter .jpg ending comes from older Windows systems that limited file extensions to three characters, so .jpeg was shortened to .jpg. Modern Windows, macOS, and other systems accept both, and a file named photo.jpg and a file named photo.jpeg contain the same kind of image data.
You can usually rename one ending to the other without harming the file, because you are only changing the label, not converting the image. Programs treat .jpg and .jpeg as the same format. If a program ever refuses one ending, saving or exporting the file again with the other ending will usually solve the problem.
JPEG vs PNG vs WebP
JPEG is not the only image format, and choosing the right one depends on what the picture is for. The table below compares the three formats most people meet on the web.
| Feature | JPEG | PNG | WebP |
|---|---|---|---|
| Compression | Lossy; very small files for photos | Lossless; larger files, especially for photos | Lossy or lossless; often smaller than both for web images |
| Transparency | No | Yes | Yes |
| Quality | Excellent for photos at medium to high quality; can show artifacts at low quality | Excellent for sharp graphics and text; preserves every pixel | Excellent for photos and graphics; modern browsers support it well |
| Best use | Photographs, camera images, and web photos | Logos, screenshots, icons, and images needing transparency | Web photos and graphics where small file size matters |
In short, use JPEG for photographs, PNG when you need exact sharpness or transparency, and WebP when you want a modern web format with small files. WebP is increasingly supported, but JPEG remains the safest choice when you need maximum compatibility, because almost every device and program supports it.
When to Use JPEG
JPEG is a good choice for photographs and camera images, for sharing pictures by email or messaging, and for publishing photos on a website or blog. It keeps file sizes manageable, loads quickly, and works everywhere. It is also the format most cameras and phones use by default for photos, which makes it easy to share without converting first.
Choose a medium to high quality setting for photos you want to look good, especially if they will be viewed at full size. For a website, a slightly lower quality setting can speed up loading without a visible loss, but avoid going so low that blocks or smudges appear.
When to Avoid JPEG
Avoid JPEG for logos, icons, line art, screenshots with text, and any image that needs a transparent background. JPEG does not support transparency, so transparent areas become a solid color, usually white or black. Its lossy compression can also blur sharp edges and make small text look fuzzy.
Also avoid repeatedly editing and re-saving the same JPEG if quality matters. For a work in progress, keep a lossless original, such as a PNG or the editor’s native project file, and export a JPEG only at the end. Avoid JPEG for images that must stay pixel-perfect, such as medical, scientific, or archival images where every detail counts.
How to Open and Convert JPEG Files
Opening a JPEG is usually as simple as double-clicking it. On Windows, Photos opens JPEG files by default. On macOS, Preview does the same. On phones, the built-in gallery or Photos app opens them, and every major web browser can display a JPEG directly. If a JPEG will not open, check that the file downloaded completely and that its extension is .jpg or .jpeg, not a renamed or damaged file.
To convert a JPEG to another format, open it in an image editor and use Save As or Export. In Windows Photos or Paint, in macOS Preview, or in a free editor, choose the new format, such as PNG or WebP, and save a copy. Keep the original JPEG until you are sure the converted copy looks right. To convert a PNG, WebP, or another image to JPEG, use the same Save As or Export step and choose JPEG or JPG, then pick a quality setting that balances size and appearance.
Online converters can also change JPEG files, but use them with care. Avoid uploading private photographs or sensitive documents to a website you do not trust, and download the result only from a reputable service.
Frequently Asked Questions
What is JPEG in simple terms?
JPEG is a common image format for photographs. It compresses photos into smaller files by discarding some detail that is hard to notice, so pictures are easier to store, share, and load online.
Is there a difference between JPG and JPEG?
No. JPG and JPEG are the same format. JPG is simply the shorter, three-letter version of the .jpeg extension, used because older Windows systems limited extensions to three characters.
Does JPEG lose quality?
Yes, JPEG uses lossy compression, so some detail is discarded when a file is saved, especially at low quality settings. At medium to high quality, the loss is usually hard to notice in a photograph, but repeated re-saving can gradually reduce quality.
Can a JPEG have a transparent background?
No. JPEG does not support transparency. If you need a transparent background, use PNG or WebP instead.
How do I convert a JPEG to PNG?
Open the JPEG in an image editor, such as Windows Photos, Paint, or macOS Preview, then use Save As or Export and choose PNG. Save it as a new file so you keep the original JPEG as well.
JPEG has lasted for decades because it solves a practical problem well: it makes photographs small, compatible, and good-looking enough for everyday use. Use it for photos, choose a sensible quality setting, keep an original for editing, and switch to PNG or WebP when you need transparency or razor-sharp graphics.
[…] Other causes include underexposure, heavy cropping, and aggressive compression. If a photo is too dark and you brighten it in editing, you will reveal noise that was hidden in the shadows. If you crop a small part of a photo and enlarge it, you enlarge the grain too. And if a photo is saved as a low-quality JPEG, compression adds blocky artefacts that can look like grain. To understand why, see our guide to what JPEG is and how JPEG compression works. […]