Joint Photographic Experts Group

.jpg · Images

JPG, also saved as .jpeg, .jpe or .jfif, is the default format for photographs. Cameras, Android phones, web pages, online shops and e-mail have relied on it for more than thirty years. It compresses lossily: it discards detail the eye is unlikely to miss, so a 12-megapixel photo that would take about 36 MB uncompressed usually fits into 3 to 5 MB. If you have a JPG, it most likely came from a phone or camera, a website, a messaging app or a scanner.

Where JPEG came from

The name belongs to the Joint Photographic Experts Group, a committee of ISO and the CCITT (today ITU-T) that started work in 1986. The result was published as ITU-T Recommendation T.81 in 1992 and as ISO/IEC 10918-1 in 1994. That standard describes only the compression. The file you actually open is a container: either JFIF, written by Eric Hamilton at C-Cube Microsystems in 1992 and later standardised as ISO/IEC 10918-5, or Exif, created by the Japanese camera industry in 1995 for camera files. Newer formats such as JPEG 2000, WebP, HEIC, AVIF and JPEG XL compress better, yet none has displaced JPG, because every device and program can read it.

How a JPG is stored

  • Colour is separated from brightness. The image is converted to YCbCr. Colour channels are usually stored at half resolution (chroma subsampling 4:2:0), because the eye notices brightness detail far more than colour detail.
  • 8 × 8 blocks. Each block is transformed with the discrete cosine transform and the fine frequencies are rounded off. The quality setting (typically 0 to 100) controls how hard. That rounding is where data is lost, and it produces the familiar blocky artefacts at low quality.
  • 8 bits per channel, 16.7 million colours, maximum 65,535 × 65,535 pixels. A 12-bit mode exists in the standard but is almost never used.
  • No transparency, no layers, no animation. Logos with transparent background need PNG or WebP.
  • Metadata: Exif (camera, lens, exposure, date, often GPS position), an orientation tag, ICC colour profile, XMP and IPTC captions.

Every new save in JPG compresses again, so repeated editing and saving slowly degrades the picture. Keep originals and save to JPG once, at the end.

Opening and editing JPG

Every system opens JPG out of the box: Photos on Windows, Preview and Photos on macOS, the image viewer of any Linux desktop, and the gallery on any phone. For editing, GIMP and Krita are free and open source, Photoshop and Affinity Photo are the commercial standards. Rotation without recompression is possible with jpegtran or with viewers that offer lossless JPEG rotation, such as IrfanView or XnView MP.

Common JPG problems

JPG photo is rotated sideways

The camera stored the pixels as shot and wrote the orientation into Exif. Programs that ignore the tag show the photo on its side. Our converter rotates the pixels themselves, so the result looks right everywhere.

JPG won't open or says the file is corrupted

Check first whether it really is a JPG. Phones often share HEIC photos and browsers save WebP images with a .jpg name. A HEIC file starts with ftyp a few bytes in, a WebP with RIFF; a genuine JPG starts with the bytes FF D8. Rename it to the real extension and convert it as that format. A photo with a grey or missing bottom part is truncated, usually by an interrupted download or a damaged memory card. The missing data cannot be restored, only the visible part can be saved.

Colours look wrong or very dark

JPG can also contain CMYK data for print. Some viewers and browsers display such files with strange colours. Convert the file to RGB in an editor, or ask the print shop for an RGB export.

Text in a screenshot looks blurred

JPG compression smears sharp edges. For screenshots, diagrams and logos use PNG, see JPG to PNG (it stops further loss, it cannot undo it).

Converting JPG

The usual targets are PDF for documents and portals (JPG to PDF), PNG for further editing and WebP or AVIF for smaller web images. Into JPG people most often convert HEIC, WebP, PNG, PDF and camera RAW such as CR2 or NEF. Our converter saves JPG at quality 90. Transparent areas become white, from multi-page or animated sources only the first page or frame is used, and metadata is not removed on purpose. We do not resize, so if a portal wants a smaller file, reduce the dimensions in Photos (Windows) or Preview (macOS) first.

JPG at a glance

Developed byJoint Photographic Experts Group (ISO/IEC JTC 1 and ITU-T)
First release1992 (ITU-T T.81), ISO/IEC 10918-1 in 1994
File containersJFIF (ISO/IEC 10918-5), Exif
Typeraster image
Compressionlossy (DCT), lossless modes rarely used
Colour depth8 bits per channel, greyscale, RGB or CMYK
Typical usephotographs, web, e-mail, cameras

Specifications: jpeg.org, ITU-T T.81 and the Library of Congress description of JFIF 1.02.

We can convert JPG into

Documents

Images

PNGWEBP GIF TIFFHEICAVIFJXLPSDICOAAIAPNGARTAVS BMP CINCURDCMDCXDDSDPXFF FITSFL32 HDRHRZJP2JBIGJNGJPCMNGMTVOTBPALMPAM PBMPCD PCXPFMPGMPGXPHMPICTPPMPSBPTIFQOIRASRGFSGISIXELSUN TGAVICARVIFFVIPS WBMPXBMXPMXWD

Vector images

SVG EPSEMF PSFXGHPGLPOVSIFSVGZWMFXAML

eBooks

EPUB MOBI AZW3 FB2CBZDJVUHTMLZ LIT LRF OEB PDB TCRTXTZCB7CBT