JPEG Signature Format: Introduction & Recovery

Joint Photographic Experts Group

Type code JPEG
File extension .jpg, .jpeg, .jpe, .jif, .jfif, .jfi
Type of format Raster/lossy
Colors up to 24-bit
Compression JPEG
Numerical Format Big-endian
Magic number FF D8 FF
Developer Joint Photographic Experts Group
Release Date 1992

JPEG is an acronym for Joint Photographic Experts Group, which was formed between ISO/IEC JTC1 and ITU-T.

During the 1992 this committee created and released the JPEG format and during the 90's they continued to update it and create its variations.

JPEG is a commonly used method of lossy compression for digital images, mostly for those images produced by digital cameras. The degree of compression can be adjusted, allowing a tradeoff between storage size and image quality.

JPEG compression is used in a number of image file formats. JPEG/Exif is the most common image format used by digital cameras and other image capturing devices.

On the other hand, JPEG/JFIF is the most commonly used format for storing and transmitting photographic images on the Internet.

JPEG files (compressed images) start with an image marker that always contains the tag code hex values FF D8 FF. It does not have a length of the file embedded. Therefore, we need to find JPEG trailer, which is FF D9. A closer look at the JPEG image:

JPEG sample

If we explore example.jpg file's binary data using any available Hex Viewer, like Active@ Disk Editor, we can see that it starts with signature FF D8 FF:

Exploring example.jpg file's binary data using Hex Viewer

Since it does not have a length of the file embedded, we need to find a JPEG trailer, which is FF D9.

JPEG trailer