What Is JPEG? The Image Format That Runs the Web
JPEG has been the default image format for photographs since 1992. Over 30 years later, it remains the most widely supported and widely used image format on the internet. Every digital camera, every smartphone, every browser, and every image editor speaks JPEG.
Newer formats like WebP and AVIF compress more efficiently, but JPEG's universal compatibility makes it the format you reach for when compatibility matters more than compression ratio. Here is how JPEG actually works, when to use it, and when to choose something else.
How JPEG Compression Works
JPEG stands for Joint Photographic Experts Group — the committee that designed the standard. The format uses lossy compression: it permanently discards image data to reduce file size. The compression algorithm is designed to discard information the human visual system is least likely to notice.
The JPEG Pipeline (Simplified)
Color space conversion. The image is converted from RGB to YCbCr — a color model that separates luminance (brightness) from chrominance (color). Human vision is more sensitive to brightness changes than color changes, so the compression treats them differently.
Chroma subsampling. The color channels (Cb and Cr) are reduced in resolution — typically halved in both dimensions (4:2:0 subsampling). This immediately reduces the color data to 25% of its original size with minimal visible impact, because the human eye has fewer color-sensitive receptors than brightness-sensitive ones.
Block splitting. The image is divided into 8×8 pixel blocks (64 pixels each). Each block is processed independently.
Discrete Cosine Transform (DCT). Each 8×8 block is transformed from pixel values (spatial domain) into frequency coefficients (frequency domain). Low-frequency coefficients represent broad color patterns; high-frequency coefficients represent fine details and sharp edges.
Quantization. This is where quality loss happens. The frequency coefficients are divided by values from a quantization table and rounded to integers. High-frequency coefficients (fine detail) are divided by larger values, so they are more aggressively rounded — often to zero. The quality setting (1-100) controls how aggressive this quantization is.
Entropy coding. The quantized coefficients are compressed using Huffman coding (or arithmetic coding in some implementations), replacing frequent patterns with shorter codes.
The result: a photograph that is 70-95% smaller than the raw pixel data, with quality loss that is usually imperceptible at settings of 75-85.
What the Quality Setting Actually Controls
| Quality | What Happens | Typical Use |
|---|---|---|
| 95-100 | Almost no data discarded. Massive files. | Archival, source files |
| 85-90 | Minimal loss. Indistinguishable from original at normal viewing. | General web use, sharing |
| 75-80 | Noticeable at 200% zoom. Fine for most purposes. | Optimized web delivery |
| 50-70 | Visible artifacts at normal size. Block patterns emerge. | Thumbnails, previews |
| Below 50 | Heavy artifacts. Block edges visible. Color banding. | Only for extreme size constraints |
Critical: JPEG quality is not linear. Quality 90 is not "twice as good" as quality 45. The visual difference between 75 and 85 is subtle; the file size difference is 30-50%. The visual difference between 85 and 95 is nearly invisible; the file size difference is 100-200%.
Convert between any image format instantly — free, instant, no signup. Your images never leave your browser.
Convert Images →JPEG Technical Specifications
| Property | Value |
|---|---|
| Full name | Joint Photographic Experts Group |
| Standard | ITU-T T.81 / ISO/IEC 10918-1 (1992) |
| Compression | Lossy (DCT-based) |
| Color depth | 8-bit per channel (24-bit RGB) |
| Maximum dimensions | 65,535 × 65,535 pixels |
| Transparency | Not supported |
| Animation | Not supported |
| Color profiles | ICC profiles supported |
| Metadata | EXIF, XMP, IPTC, ICC |
| File extensions | .jpg, .jpeg, .jpe, .jfif |
| MIME type | image/jpeg |
| Progressive mode | Supported (renders low-quality preview first) |
JPEG and JPG are the same format. The .jpg extension exists because early Windows (DOS) limited file extensions to three characters. .jpeg and .jpg are interchangeable — they contain identical data. See JPEG vs JPG for the full story.
JPEG vs Other Formats
| Format | Compression | Transparency | Animation | File Size (photos) | Best For |
|---|---|---|---|---|---|
| JPEG | Lossy | No | No | Baseline | Photos, universal compatibility |
| PNG | Lossless | Yes | APNG | 3-5× larger | Screenshots, logos, text |
| WebP | Both | Yes | Yes | 25-35% smaller | Modern web delivery |
| AVIF | Both | Yes | Yes | 30-50% smaller | Best compression, slower encoding |
| HEIC | Both | Yes | Yes | 40-50% smaller | Apple ecosystem (iOS, macOS) |
| GIF | Lossless (8-bit) | 1-bit | Yes | Varies | Simple animations |
| TIFF | Both | Yes | No | Very large | Print, archival |
JPEG vs PNG: JPEG is lossy, PNG is lossless. For photographs, JPEG produces files 3-5× smaller with minimal visible quality difference. For graphics with sharp edges, text, or transparency, PNG is the right choice. See JPG vs PNG.
JPEG vs WebP: WebP produces 25-35% smaller files at the same visual quality. All modern browsers support WebP. JPEG wins only on legacy compatibility — older email clients, some print services, older software. See PNG vs WebP and Best Image Format for Web.
JPEG vs AVIF: AVIF produces 30-50% smaller files and supports features JPEG lacks (transparency, HDR, lossless mode). Browser support is universal since 2024. AVIF encoding is slower. See What is AVIF? and WebP vs AVIF.
When to Use JPEG
Use JPEG for:
Photographs. This is what JPEG was designed for. The DCT compression algorithm is optimized for the gradients and complex detail patterns found in photographs. A photo at quality 80-85 is visually indistinguishable from the original for most viewers.
Email attachments. JPEG is the safest format for sending images via email. Every email client on every platform renders JPEG correctly.
Social media uploads. All platforms accept JPEG. Some platforms convert other formats to JPEG internally anyway.
Print submissions. Most print shops accept JPEG at quality 90-100. For professional print, TIFF is preferred, but high-quality JPEG is widely accepted.
Maximum compatibility. When you do not know what software the recipient will use, JPEG works everywhere.
Do NOT use JPEG for:
Logos, icons, and graphics with sharp edges. JPEG creates visible ringing artifacts around high-contrast edges. Use PNG or SVG.
Images with text. JPEG compression degrades text legibility — letters develop fuzzy edges and color fringing. Use PNG.
Images requiring transparency. JPEG has no alpha channel. Use PNG or WebP.
Working files that will be re-edited. Each JPEG save cycle adds compression artifacts. Use PNG, TIFF, or your editor's native format for source files. Export JPEG only as the final step.
Images for repeated re-encoding. Transcoding JPEG → edit → JPEG → edit → JPEG compounds quality loss. Convert to a lossless format for editing.
How to Compress JPEG Files
JPEG quality and file size are directly related. Compressing a JPEG means re-encoding it at a lower quality setting or using a smarter encoder.
Pixotter's JPEG compressor handles this in your browser:
- Open pixotter.com/compress.
- Drop your JPEG files.
- Adjust the quality slider — or let Pixotter's default setting find the best balance.
- Download the compressed files.
How much can you compress? A 3 MB photo from a smartphone can typically be compressed to 300-500 KB at quality 80 with no perceptible quality difference at normal viewing sizes. For step-by-step guidance, see How to Compress JPEG Files.
Lossless JPEG optimization is also possible — tools like jpegtran and MozJPEG can reduce file size by 5-15% without touching pixel data, by optimizing the Huffman tables and removing unnecessary metadata.
Progressive vs Baseline JPEG
JPEG supports two encoding modes:
Baseline JPEG loads top-to-bottom. The image appears line by line as it downloads. This is the default for most cameras and editors.
Progressive JPEG loads in multiple passes. The first pass shows a blurry full-image preview; subsequent passes sharpen the detail. The final result is identical to baseline at the same quality.
| Property | Baseline | Progressive |
|---|---|---|
| Loading behavior | Top-to-bottom scan lines | Blurry-to-sharp full preview |
| Perceived speed | Slower (blank space until loaded) | Faster (preview appears immediately) |
| File size | Slightly larger in most cases | Slightly smaller (better entropy coding) |
| CPU usage | Lower (single-pass decode) | Higher (multi-pass decode) |
| Web best practice | Fine for small images | Recommended for images > 10 KB |
For web delivery, progressive JPEG is generally preferred — users see something immediately instead of staring at blank space. MozJPEG and most modern encoders default to progressive mode.
JPEG Metadata: EXIF and Beyond
JPEG files carry metadata in several formats:
EXIF (Exchangeable Image File Format): Camera settings — aperture, shutter speed, ISO, focal length, date, GPS coordinates, camera model. Written by cameras and smartphones automatically.
IPTC (International Press Telecommunications Council): Caption, keywords, copyright, photographer name. Used in photojournalism and stock photography.
XMP (Extensible Metadata Platform): Adobe's metadata format. Stores editing history, ratings, and tags. Used by Lightroom, Photoshop, and other Adobe tools.
ICC Color Profile: Describes the color space (sRGB, Adobe RGB, Display P3). Ensures consistent color across devices and monitors.
Metadata can add 10-50 KB to a JPEG file. For web delivery, stripping non-essential metadata reduces file size. For archival and professional use, keep it. For more on EXIF data, see What is EXIF Data? and How to Remove EXIF Data.
Frequently Asked Questions
Are JPEG and JPG the same thing?
Yes. The .jpg extension exists because early DOS and Windows limited file extensions to three characters. .jpeg and .jpg are identical formats with identical data. See JPEG vs JPG: Are They Different? for the full explanation.
Can I convert JPEG to PNG without losing quality?
You can convert JPEG to PNG, but it does not recover quality that JPEG compression already removed. The PNG output is a lossless copy of the JPEG data — including any existing compression artifacts. It will also be significantly larger. This is useful if you need to edit the image without further quality loss, but it does not improve the image. See How to Convert JPG to PNG.
What JPEG quality should I use for my website?
Quality 75-85 covers most web use cases. At this range, the file is 70-90% smaller than the original with imperceptible quality loss at normal viewing sizes. Below 70, compression artifacts become visible. Above 90, the file size increase is substantial with diminishing quality gains. For optimized web delivery, consider WebP or AVIF instead.
Does saving a JPEG multiple times degrade quality?
Yes, if you re-encode each time. Every JPEG save cycle re-applies lossy compression, adding new artifacts. Opening a JPEG, rotating it, and re-saving creates a generation loss. To avoid this: edit in a lossless format (PNG, TIFF, or your editor's native format) and export JPEG only as the final step.
Why does my JPEG have a white background instead of transparent?
JPEG does not support transparency. The format has no alpha channel. If you need an image with a transparent background, use PNG or WebP. See What is PNG? for the format that supports full alpha transparency.
What is MozJPEG?
MozJPEG is a JPEG encoder developed by Mozilla that produces files 5-10% smaller than the standard libjpeg encoder at the same quality level. It achieves this through better quantization tables and trellis quantization. MozJPEG is backwards-compatible — the output is standard JPEG that opens in any viewer. Many modern image optimization tools use MozJPEG internally.
Is JPEG still worth using in 2026?
Yes, for compatibility. WebP and AVIF compress more efficiently, but JPEG works everywhere — every browser, every email client, every image editor, every operating system. For web-only delivery, WebP is the better default. For sharing, printing, and maximum compatibility, JPEG remains the standard. See Best Image Format for Web for the current format landscape.
Convert between any image format instantly — free, instant, no signup. Your images never leave your browser.
Convert Images →