What is JPG?
JPG (also written JPEG) is a lossy image format that discards visual detail the eye is least likely to notice, which is why photographs stored as JPG are typically 5–15 times smaller than the same image stored losslessly.
JPG at a glance
- MIME type
- image/jpeg
- File extensions
- .jpg, .jpeg, .jpe
- Specification
- ISO/IEC 10918-1, published 1992
- Compression
- Lossy, based on the discrete cosine transform. Quality is set per file at encode time.
- Transparency
- None. JPG has no alpha channel, so transparent pixels must be filled with a solid colour.
- Animation
- Not supported.
- Colour depth
- 8 bits per channel, 24-bit colour. No HDR.
- Metadata
- EXIF, IPTC and XMP, which can include GPS coordinates, camera serial numbers and timestamps.
- Support
- Universal. Every browser, operating system, camera, printer and image editor released in the last thirty years reads JPG.
Strengths and weaknesses
- Smallest reliable choice for photographs at a given perceived quality.
- Accepted everywhere, including systems that reject newer formats outright.
- Encoding is fast and needs almost no memory.
- No transparency, so logos and cut-out graphics need PNG or WebP instead.
- Sharp edges — text, screenshots, line art — get visible ringing artefacts.
- Every re-save compresses again, so repeated editing degrades the image permanently.
What "quality" actually means in a JPG
The quality number is not a percentage of anything. It selects a quantisation table, and how much damage that table does depends entirely on the picture: a smooth portrait and a photo of foliage encoded at the same setting end up at very different levels of visible loss.
Measured on our own test set, a smooth photograph at quality 85 reaches a structural similarity of 0.9951 against the original — far more than needed, since quality 57 still looks identical and is 53% smaller. A high-texture photo at that same quality 85 only reaches 0.9882, which is the point at which the difference starts to be visible. This is why our converters pick the setting by measuring the result rather than by asking you for a number.
Chroma subsampling, the setting nobody mentions
Most JPG encoders throw away three quarters of the colour information by default (4:2:0 subsampling) because the eye resolves brightness far better than colour. On photographs this is invisible and saves real space. On saturated flat colour — a red logo, coloured text, a chart — it produces obvious smearing at the edges.
Our encoders switch to full colour resolution (4:4:4) above quality 70. On a test image with saturated edges that change alone raised structural similarity from 0.9733 to 0.9999 and cost 4 KB.
Working with JPG files
Convert to JPG
- PNG to JPGConvert PNG images to JPG
- WEBP to JPGConvert WEBP images to JPG
- AVIF to JPGConvert AVIF images to JPG
- HEIC to JPGConvert iPhone HEIC to JPG
- Compress JPGReduce JPG file size
Convert or edit a JPG file
Formats people compare this with
- PNGPNG is a lossless image format: it stores every pixel exactly as it was saved, supports a full alpha transparency channel, and never degrades no matter how many times the file is opened and saved again..
- WebPWebP is an image format developed by Google that offers both a lossy and a lossless mode, supports transparency and animation in either mode, and is typically 25–35% smaller than a JPG of comparable quality..
- AVIFAVIF stores a still image using AV1 video compression inside a HEIF container.
- HEICHEIC is the format an iPhone saves photos in by default: HEVC-compressed images inside a HEIF container, roughly half the size of the equivalent JPG, and unreadable by most software that is not made by Apple..