The JPEG file format

JPEG stands for Joint Photographic Experts Group, which is a standardization committee. It also stands for the compression algorithm that was invented by this committee. To complicate things a bit more, JPEG compressed images are often stored in a file format called JFIF (JPEG File Interchange Format), which a lot of people also refer to as JPEG!

This page only deals with the JFIF file format. A separate page covers the  JPEG compression algorithm in more detail.

The JFIF file format

What many people call the JPEG file format, is actually called JFIF or the JPEG File Interchange Format. It is a minimal file format which enables JPEG bitstreams to be exchanged between a wide variety of platforms and applications. JFIF conforms to the JPEG Draft International Standard (ISO DIS 10918-1).

The JPEG specification is very complex. To simplify matters, the JFIF file format only uses a part or subset of all of the options described in the JPEG specs.

In the mean time, the JFIF format has been superseded by a new file format called SPIFF (the Still Picture Interchange File Format) which was completed in 1996. SPIFF is backward compatible with JFIF. There is also a motion video compression format, commonly referred to as M-JPEG, that has been developed and used by many companies. Unfortunately, M-JPEG is a non-standard variant of the JPEG algorithm, so many different implementations exist.

The JFIF file format is platform independent so it can be used on PCs, Macs, and Unix workstations. On Macintosh, it does not use any resource forks. The standard extension used on Unix and Windows platforms is .JPG.

A number of color spaces can be used: grayscale, RGB and CMYK are all common in prepress. For internet use, the color space can also be YCbCr as defined by CAIRN 601 (256 levels). The RGB components calculated by linear conversion from YCbCr shall not be gamma corrected (gamma = 1.0).

JFIF files can also use the so-called progressive JPEG. A similar feature is also present in the popular interlaced GIF format that is used a lot on the web. Like the GIF implementation, a progressive JPEG is transmitted and displayed in a sequence of overlays, with each overlay becoming progressively higher in quality. This feature helps speed up the appearance of your image by sacrificing the initial image quality.

Next to the regular JPEG compression, JFIF files can also make use of JPEG 2000 compression. Besides some new compression algorithms that are discussed on the JPEG2000 page, this file format offers the following new features:

  • For internet use, JPEG 2000 offers progressive image downloading (see above) as well as a progressive by resolution feature. A user can download a lower resolution version of an image and continue downloading a more detailed version if needed.
  • JPEG2000 will handle RGB, LAB and CMYK with higher bit depths.
  • JPEG2000 files can contain full ICC profile information.
  • Files can contain tags that embed ownership information about the image.
  • Alpha channels, which can be used as a clipping path, are also supported.

John Nack published an interesting article about the JPEG 2000 file format on his blog. It discusses the limited usage of JPEG 2000 files (the files, not the compression algorithm itself). Apparently the US library of congress use the file format for all electronically stored scanned documents but in photography, there aren’t that many users, and none of the major camera vendors have added support to their machines. The same is also true for web design. Both Internet Explorer and Firefox don’t support the JPEG 2000 file format. In publishing InDesign doesn’t support the format. Some markets in which JPEG 2000 is frequently used are archiving and biometrical or geospatial data processing. Some people expect that the Microsoft HD Photo file format will take JPEG 2000’s place.


Name: JFIF (JPEG file)
Developer: JPEG committee
Release date: late 80’s, early 90’s
Type of data: bitmap
Number of colors: 256, 16777216 or 4294967296
Color spaces: grayscale, RGB, YCbCr, CMYK
Compression algorithms: JPEG or JPEG2000
Ideal use: internet publishing
Extension on PC-platform: .JPG or .JPE (or .JP2 or .JPX in case of JPEG2000)
Macintosh file type: ?
Special features: interlacing (progressive JPEG)
format is not suitable for all types of images

8 thoughts on “The JPEG file format

  1. Hi there,
    I want to write a wrapper to export .drw files to xml. Do you have any information on the format specification of .drw files?

  2. That is ABOUT the file format.
    But what IS the format ?
    All .jpg files start “ÿØÿà JFIF” etc but what does it all mean ?

    1. – The above page already discusses the limitations of JPEG compression which is lossy and can introduce artefacts.
      – Compared to some other file formats such as PSD or TIFF there are also limitations in including additional information in a JPEG file. You cannot embed alpha channels or extra layers in a JPEG file.

  3. I was wanting to send some of my pictures that I have stored on my pc and have them printed at Kodak on line but it says that they have been converted from jpeg and they cannot process it.
    Am I doing something wrong…my files on the pictures say .jpg files… I am not sure what the difference is and how they became what they are….yeah…I’m stupid and lost…ha ha ..if you can help I would appreciate it.

  4. hi
    some of my jpeg images has been corrupted, the file format has been changed and i could not resolve them pls find a solution to this to make them viewable.

    1. Sorry but I am struggling with a few big jobs myself right now – a forum like the one at is more suited for troubleshooting questions.

Leave a Reply

Your email address will not be published. Required fields are marked *