JPEG: The Universal Image Format

JPEG is the image format almost everything uses. It was named after the Joint Photographic Experts Group, and it makes photos small by lossy compression, which means it permanently discards some of the picture data. Cameras, phones, websites and apps all read and write it, which is why it is the default for sharing photos.

Wondering when JPEG is the right choice and when it is not? Image file formats compares JPEG with RAW, TIFF and PNG.

How the compression works

The encoder splits the picture into small blocks and keeps the information your eye notices most, which is brightness and broad shapes. It simplifies the information your eye notices least, such as tiny color differences and very fine texture. A photo can shrink to a tenth of its size or less and still look fine at normal viewing size. The more you compress, the more the simplification becomes visible.

Quality settings

Most cameras and programs let you pick a quality level. Higher levels keep more detail and make bigger files. For photographs, a setting somewhere around 80 to 95 on a 100 point scale is the usual compromise. Go much lower and artifacts appear: blocky patches, ragged edges around text and fine lines, and bands across smooth areas like clear sky.

What gets baked in

When the camera produces a JPEG, it makes every processing decision for you at that moment. White balance, contrast, sharpening, noise reduction and color style are all applied, and the file stores only 8 bits per channel. You cannot undo those choices later, and large changes can show up as banding or noise. A RAW file keeps the sensor’s data instead, which is why it gives you more room to correct mistakes.

Generation loss

Every time you open a JPEG, change it and save it again, the compression runs again and a little more is lost. After a few rounds, the damage becomes visible. To avoid it:

  • Make your edits from the original file, either a RAW or a lossless copy, and save a JPEG only as the last step.
  • Keep an unedited original, so you can always start again.
  • Do not resave a JPEG just to look at it. Opening and closing without saving costs nothing.

When it is the right choice

Use JPEG for anything that will be viewed rather than edited further: web pages, email, messages, social posts and most prints. Choose a size that suits the use, since a huge file slows a page down for no benefit. See image resolution and file sizes for how to pick one. It is also a sensible camera choice when speed, card space and instant sharing outweigh editing room. If you plan to edit heavily, shoot RAW and export JPEGs at the end.