JPEG Start of Image marker
FF D8 FFThe actual SOI marker is FF D8 at offset 0. It is normally followed by another marker prefix byte FF, which produces the common three-byte file signature shown above.
Common JPEG markers
| Marker | Name | Purpose |
|---|---|---|
| FF D8 | SOI | Start of Image |
| FF E0 | APP0 | Often carries a JFIF identifier and density fields |
| FF E1 | APP1 | Often carries Exif or XMP metadata |
| FF DB | DQT | Quantization table definition |
| FF C0 | SOF0 | Baseline DCT frame header |
| FF C2 | SOF2 | Progressive DCT frame header |
| FF C4 | DHT | Huffman table definition |
| FF DA | SOS | Start of Scan |
| FF D9 | EOI | End of Image |
Variable-length marker segments
Most markers that carry parameters are followed by a two-byte big-endian segment length. That length includes the two length bytes themselves but not the marker. Offsets after SOI are therefore not globally fixed.
Entropy-coded scan data follows SOS. Inside that data, FF 00 represents a stuffed literal FF byte, so a raw search for FF is not enough to parse scan boundaries correctly.
Practical JPEG inspection checks
- Confirm SOI at the beginning and EOI near the end.
- Read each parameter segment length as big-endian before advancing.
- Distinguish APP0/JFIF and APP1/Exif metadata rather than assuming one is always present.
- Use SOF0 or SOF2 to find image precision, height, width, and component information.
- Use a JPEG-aware parser for full entropy-stream and table validation.
Local processing and privacy
The JPEG file format workflow opens the same Bitpeek browser workspace. Selected file bytes, file names, pasted input, searches, edits, hashes, and comparison data are processed in local browser memory and are not sent to a Bitpeek server.
The static guide itself can be read without opening a file or creating an account.
Technical reference: ITU-T Recommendation T.81 — JPEG interchange format.
Frequently asked questions
Why is the common JPEG signature three bytes if SOI is two?
SOI is FF D8. A valid interchange stream continues with another marker, whose prefix is FF, so file-signature tables commonly use FF D8 FF.
Is Exif always present in a JPEG?
No. Exif commonly appears in an APP1 segment, but JPEG files can omit it or use APP1 for other identified payloads such as XMP.
Are JPEG segment offsets fixed?
No. Segment lengths and optional metadata determine later offsets. Parse the two-byte length of each applicable marker segment.