A .jxl file is either a bare codestream, starting FF 0A,
or a container of boxes, defined in ISO/IEC 18181-2, that holds the codestream with
metadata. The boxes use the ISO base media file format header: a 4-byte big-endian
size, a 4-byte type, and a 64-bit size when the size field is 1 (see
the box header). The ISO text is not freely
available; this page follows the reference library libjxl and its documentation. The
codestream itself is on Codestream headers
and Frames.
Signature
| Form | First bytes |
|---|---|
| Bare codestream | FF 0A |
| Container | 00 00 00 0C 4A 58 4C 20 0D 0A 87 0A: a 12-byte box of type JXL holding 0D 0A 87 0A |
The signature box comes first and an ftyp box second:
00 00 00 14 66 74 79 70 6A 78 6C 20 00 00 00 00 6A 78 6C 20, major brand
jxl , minor version 0, compatible brand jxl .
Boxes
| Type | Contents | Rules |
|---|---|---|
JXL | 0D 0A 87 0A | First box, always 12 bytes. |
ftyp | Brand jxl , minor version 0, compatible jxl | Second box. |
jxll | One byte: the codestream level, 5 or 10 | Optional; before the codestream. Without it the level is 5. |
jxlc | The whole codestream, from FF 0A | Either one jxlc or a series of jxlp, not both. |
jxlp | u32 index, then a piece of the codestream | Partial codestream. The pieces joined in order equal the codestream, so metadata boxes can sit between them. The low 31 bits of the index count from 0; the top bit is set on the last piece. |
Exif | u32 offset, then Exif data | The offset is the number of bytes from the end of this field to the TIFF header of the Exif data; 0 when it follows at once. |
xml | XMP packet | XMP metadata as XML. |
jumb | JUMBF superbox | JPEG universal metadata (ISO/IEC 19566-5), e.g. C2PA provenance. |
brob | 4CC of the original box, then Brotli data | A Brotli-compressed box (RFC 7932). Decompressing gives the contents of a box of the stated type. libjxl uses it for Exif, xml and jumb. The boxes the reader needs to find the image (the signature, ftyp, jxll, jxlc, jxlp) are never compressed. |
jxli | Frame index | Optional offsets and timestamps of animation keyframes, for seeking. |
jbrd | JPEG bitstream reconstruction data | Present when the codestream is a losslessly recompressed JPEG: with it the original JPEG file can be rebuilt byte for byte. Not needed for display. |
Metadata boxes never change how the image looks: the codestream carries the orientation, colour space and size, and they override any Exif values.
Levels
| Level | Limits |
|---|---|
| 5 | At most 268,435,456 pixels and 262,144 pixels wide or high; up to 16 bits per colour channel; at most 120 frames per second; ICC profile at most 4 MiB; at most 4 extra channels besides the 3 colour channels; no CMYK and no black extra channel. The level for image delivery, supported by every decoder. |
| 10 | Removes or raises most level 5 limits: allows CMYK and up to 32 bits per channel. A file that needs it must say so in jxll. |
Unconfirmed: the full list of level 10 limits, and the exact byte layout of
jxli and jbrd, which this site has not read in the
standard.