Skip to main content
Image format guide

What is a JPG file?

JPG is the format almost every device understands. Learn why it is so small, what it gives up to get there, and when a different format is better.

  • Universal support across devices and apps
  • Lossy compression keeps files small
  • No transparency, no animation

JPG is lossy: every save discards a little more information. Keep an uncompressed master if you plan to edit the photo repeatedly.

How JPG compression works

JPG compresses a photograph by throwing away detail that the human eye is unlikely to notice, especially in smooth gradients and fine texture. The quality setting controls how much is discarded. A high-quality JPG can look identical to the original at a fraction of the size; a heavily compressed one shows blocky edges and muddy colour.

Because the loss happens on every save, repeatedly opening and re-saving the same JPG gradually degrades it. For a photo you intend to edit, keep the original or work in a lossless format such as PNG and export JPG only at the end.

JPG compression works in eight-by-eight pixel blocks. For each block the encoder measures how much the brightness and colour actually vary, keeps the parts a human eye is likely to notice, and discards the rest. This is called a discrete cosine transform, and the quality slider simply decides how aggressive the discarding is. Smooth gradients survive well. Sharp edges, fine text and high-contrast lines suffer first, which is exactly why a screenshot saved as JPG looks smeared around letters while a photograph looks unchanged.

Most JPGs also use chroma subsampling. Human vision resolves brightness far better than colour, so the encoder can store full brightness information while sharing colour values between neighbouring pixels. A common 4:2:0 pattern keeps a quarter of the colour samples. That is a large part of why photographs compress so well, and it is another reason flat-colour graphics do not: their colours change abruptly, so the trick stops helping and artefacts become obvious.

Quality values between 85 and 90 are a sensible default for web photos. Above that, files grow quickly for a difference most people cannot see; below roughly 70, blocky edges and muddy colour appear around detailed areas. Note that the number is a scale, not a percentage of the original image, and different encoders use slightly different scales. A quality-90 file from one program is not necessarily identical in size to quality-90 from another.

JPG stores meta**data** alongside the pixels: camera model, exposure, date, GPS coordinates, and sometimes the editing history. That is useful for organising a photo library and inconvenient for privacy, because a picture uploaded unchanged can reveal where it was taken. Stripping metadata does not change the visible image at all. Orientation is stored as metadata too: a photo may be physically stored rotated and only appear upright because the viewer reads that tag, which is why a naive converter sometimes produces a sideways image.

Two misconceptions are worth clearing up. First, JPG 2000 is a different standard with different behaviour and is not what this format page describes. Second, repeatedly saving a JPG degrades it because each save re-encodes the already damaged pixels. There is no cumulative penalty if you keep one uncompressed master and export a JPG once at the end. That single workflow removes most of the quality anxiety people bring to a conversion.

JPG at a glance

Extension.jpg, .jpeg, .jpe
StandardISO/IEC 10918-1, published 1992
Colour depth8 bits per channel
Colour modelYCbCr with optional chroma subsampling
CompressionLossy, block-based DCT
TransparencyNone — alpha is not supported
MetadataEXIF, IPTC, XMP, ICC profiles
VariantsBaseline, progressive, CMYK (print)

Where it works

Support changes between releases. The practical answer is always to convert when a tool refuses the file.

Web browsersUniversal, all current versions
Email and upload formsThe most widely accepted image format
Photo printers and kiosksAccepted almost everywhere
Image editorsRead and write everywhere
Design tools needing alphaUse PNG instead
Archival mastersUse TIFF or PNG instead

When to use JPG

  1. 01

    Photographs

    JPG is the default for photos: small enough to share, good enough to look natural.

  2. 02

    Email and upload forms

    If a site accepts only one format, it is almost always JPG.

  3. 03

    Not for logos or text

    Sharp edges and flat colours look better as PNG, and PNG supports transparency.

Common questions

Is JPG the same as JPEG?+

Yes. The only difference is the three-letter file extension required by older Windows systems.

Does JPG support transparency?+

No. Transparent areas become a solid colour — usually white — when saved as JPG.

What quality should I export at?+

85–90% is a good default for web photos. Print can use a higher setting.

Can I turn a JPG into a PNG?+

Yes, with the JPG to PNG converter. It stops further lossy saves, but cannot restore detail already lost.

What is a JPG file used for?+

Photographs, email attachments and web images: anywhere a small file that every device can open matters more than transparency or lossless editing.