What is JPEG?
Complete guide to the JPEG file format
JPEG and JPG Are the Same Format
The first thing to clear up is the most common question: JPEG and JPG are the same thing. There is no technical difference between a file named photo.jpeg and one named photo.jpg, the bytes inside are identical, and every program treats them the same way. The reason two extensions exist is purely historical. The format is named after the Joint Photographic Experts Group, the committee that created it, so the natural extension is .jpeg. But early versions of Windows (MS-DOS and Windows up to the FAT file system era) limited file extensions to three characters, so .jpeg was shortened to .jpg. That three-letter habit stuck, and today both extensions are completely interchangeable. You can rename a .jpeg to .jpg (or back) and nothing about the image changes.
So when a site offers a "JPEG converter" or a "JPG converter," they are the same tool. When a camera saves .JPG and an app exports .jpeg, they produce the same kind of file. There is nothing to convert between them, and no quality difference to worry about. The rest of this page uses "JPEG" to mean the format and "JPG" only when referring to the extension, but everything applies equally to both.
How JPEG Compression Works
JPEG is the world's most widely used photo format because of how cleverly it throws data away. It is a lossy format, meaning it permanently discards some image information to make files dramatically smaller, and it is tuned to discard exactly the detail human eyes are least likely to miss. The process works in stages. First the image is converted to the YCbCr color space, separating brightness (luminance) from color (chrominance), because our eyes are far more sensitive to brightness than to color. The color channels can then be subsampled, stored at lower resolution, with little visible effect.
Next, JPEG divides the image into 8x8 pixel blocks and applies a Discrete Cosine Transform to each, converting the block from pixels into frequency coefficients that describe how detail varies across it. A quantization step then divides those coefficients by values from a quality-dependent table, rounding away the fine, high-frequency detail the eye barely registers. This quantization step is where the loss, and almost all the size savings, happen: a lower quality setting means more aggressive rounding, smaller files, and more visible artifacts. Finally the surviving data is packed efficiently with entropy coding. The "quality" slider you see when saving a JPEG simply controls how aggressive that quantization is.
The Strengths and the Catch
JPEG's great strength is photographs. For images with smooth gradients and millions of subtle colors, a sunset, a portrait, a landscape, JPEG produces remarkably small files at quality good enough that the loss is invisible. This is why it became the default for digital cameras, the web, and photo sharing, and why it remains universally supported by every device, browser, and program in existence. No other format can claim that reach.
The catch is two-fold. First, JPEG is poor for sharp-edged graphics: logos, text, line art, and screenshots develop ugly "ringing" halos and blocky noise around hard edges, because the format is built for gradual photographic transitions, not crisp lines. For those, PNG is the right choice. Second, JPEG loss is cumulative: every time you open a JPEG, edit it, and re-save, it is compressed again and loses a little more quality. This "generation loss" is why you should keep an original master and avoid repeatedly editing and re-saving the same JPEG.
The Standard, JFIF, and EXIF
The core JPEG coding system was published as ITU-T Recommendation T.81, equivalent to ISO/IEC 10918-1. That standard defines only the compressed data stream, so a separate wrapper is needed to store it as an actual file. The near-universal wrapper is JFIF (the JPEG File Interchange Format), which is what almost every .jpg file actually is. Cameras and phones typically use a closely related wrapper, Exif, which embeds metadata such as the camera model, exposure settings, date, and GPS location alongside the image. This is why a JPEG straight from a phone can carry location data, something to be aware of before sharing photos publicly.
JPEG vs PNG vs WebP
Against PNG, JPEG wins decisively on photographs (far smaller files) but loses on graphics and anything needing transparency or perfectly sharp edges, JPEG has no transparency support at all. Against newer formats like WebP and AVIF, JPEG produces noticeably larger files for the same visual quality, since those formats use more modern compression. WebP and AVIF are the better technical choice for the web today, but JPEG's unbeatable universal compatibility keeps it the safe default when a file must open absolutely everywhere. In short: keep using JPEG for photos that need to travel widely, reach for PNG for crisp graphics, and consider WebP when you control the platform and want smaller files.
JPEG vs Other Image Formats
| Feature | JPEG | PNG | WebP |
|---|---|---|---|
| Type | Raster | Raster | Raster |
| Compression | Lossy[1] | Lossless | Lossy & lossless |
| Transparency | No[5] | Yes | Yes |
| Color depth | 8-bit/channel[1] | Up to 16-bit | 8-bit/channel |
| Standardized by | ISO/IEC, ITU-T[1] | W3C, ISO | |
| Best for | Photographs | Graphics, transparency | Web images |
JPEG excels at compressing photographic images but lacks transparency and lossless options that PNG and WebP provide.
Pros and Cons
Advantages
- Universal Compatibility | FileFormer Supported by every browser, camera, phone, and operating system without exception.
- Excellent Compression | FileFormer Reduces photo file sizes significantly with minimal visible quality loss at high quality settings.
- Adjustable Quality | FileFormer Quality settings from 1 to 100 let you tune the size-to-quality balance for any use case.
- Identical to JPG | FileFormer Full interchangeability with .jpg means zero compatibility concerns when switching extensions.
Disadvantages
- Lossy Compression | FileFormer Data is permanently discarded on each save, causing gradual quality degradation with repeated edits.
- No Transparency | FileFormer Does not support alpha channels - transparent areas are rendered as solid white.
- Compression Artifacts | FileFormer Blocky artifacts and color banding appear at low quality settings, especially around sharp edges.
- Not Ideal for Graphics | FileFormer Text, logos, and flat-color artwork look worse in JPEG than in PNG or SVG.
Technical Details
| Developer | Joint Photographic Experts Group[1] |
|---|---|
| File Extension | .jpeg / .jpg[1] |
| MIME Type | image/jpeg[1] |
| Compression | Lossy (DCT-based)[1] |
| Color Depth | 24-bit (16.7 million colors)[1] |
| Transparency | Not supported[1] |
| Max Resolution | Up to 65,535 x 65,535 pixels[1] |
When to Use JPEG
Here are the most common situations where JPEG is the right choice:
- Web Photography | FileFormerUse JPEG for all photographic content on websites where fast loading is important.
- Digital Camera Output | FileFormerDefault format for most digital cameras and smartphones when shooting in standard mode.
- Email Attachments | FileFormerSmall JPEG files are easy to attach to emails without hitting size restrictions.
- Social Media Uploads | FileFormerMost platforms re-encode uploads as JPEG anyway, so starting with JPEG gives you predictable results.
Frequently Asked Questions about JPEG
Is .jpeg the same as .jpg?
Yes, they are completely identical. JPEG and JPG refer to the same format. The difference is only the extension length - three characters (.jpg) versus four (.jpeg).
When should I use .jpeg instead of .jpg?
There is no technical reason to prefer one over the other. Use whichever your workflow or platform requires. They are interchangeable in every software application.
Does JPEG support transparency?
No. JPEG does not support alpha channel transparency. If you need a transparent background, use PNG, WebP, or SVG instead.
How many times can I save a JPEG before quality degrades?
Each re-save applies lossy compression again. Work in a lossless format like PNG or TIFF and only export to JPEG as the final step.
What quality setting should I use for JPEG?
Quality 80 to 85 is the sweet spot for most web use. Quality 90 to 95 is appropriate for print. Going above 95 produces negligible visual improvement but noticeably larger files.