What is JPEG?
Complete guide to the JPEG file format
Last updated:
What is JPEG?
JPEG (Joint Photographic Experts Group) is a lossy image compression format standardized in 1992. The .jpeg extension is identical to .jpg - both refer to the exact same format and the same compression algorithm. Early versions of Windows required file extensions to be exactly three characters, which is why .jpg became the common shorthand. Modern operating systems and software support both extensions interchangeably.
JPEG uses Discrete Cosine Transform (DCT) compression to reduce file sizes by discarding image data that the human eye is least sensitive to. A typical photograph can be compressed to one-tenth of its original size with barely perceptible quality loss. The format supports adjustable quality levels, giving you full control over the trade-off between file size and visual fidelity.
How JPEG Compression Works
JPEG divides an image into 8x8 pixel blocks and applies a Discrete Cosine Transform to each, converting spatial detail into frequency coefficients.[1] A quantization step then divides these coefficients by values from a quality-dependent table, discarding fine high-frequency detail the eye is least likely to notice; the surviving coefficients are entropy-coded with Huffman or arithmetic coding.[1] Images are usually first converted to the YCbCr color space so the chrominance channels can be subsampled, since human vision is more sensitive to luminance than color.[5]
The Standard and Its Containers
The core coding system was published as ITU-T Recommendation T.81, equivalent to ISO/IEC 10918-1.[1] That standard defines only the compressed data stream, so a separate wrapper is needed to store it as a file; the near-universal wrapper is JFIF, the JPEG File Interchange Format, which most .jpg files actually use.[3] The Library of Congress documents JPEG as a family of related encodings rather than a single monolithic format.[2]
Limitations
Because quantization is lossy, repeatedly editing and re-saving a JPEG causes generation loss, with artifacts accumulating around sharp edges and in smooth gradients.[5] The baseline format also lacks transparency and is limited to 8 bits per channel, which is why the JPEG committee and others developed successors aimed at higher dynamic range and alpha support.[4]
Technical Details
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
Supported by every browser, camera, phone, and operating system without exception.
Reduces photo file sizes significantly with minimal visible quality loss at high quality settings.
Quality settings from 1 to 100 let you tune the size-to-quality balance for any use case.
Full interchangeability with .jpg means zero compatibility concerns when switching extensions.
Disadvantages
Data is permanently discarded on each save, causing gradual quality degradation with repeated edits.
Does not support alpha channels - transparent areas are rendered as solid white.
Blocky artifacts and color banding appear at low quality settings, especially around sharp edges.
Text, logos, and flat-color artwork look worse in JPEG than in PNG or SVG.
When to Use JPEG
Here are the most common situations where JPEG is the right choice:
Web Photography
Use JPEG for all photographic content on websites where fast loading is important.
Digital Camera Output
Default format for most digital cameras and smartphones when shooting in standard mode.
Email Attachments
Small JPEG files are easy to attach to emails without hitting size restrictions.
Social Media Uploads
Most platforms re-encode uploads as JPEG anyway, so starting with JPEG gives you predictable results.
Convert JPEG Files
Need to convert your JPEG files? Use our free online converter.
Try Image Converter FreeFrequently 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.