Guide
JPEG Quality and Quantization Tables Explained
Last updated October 6, 2026
Every image program offers a quality slider for JPEG, and many people assume the file remembers the number. It does not. What a JPEG stores is a set of tables that say how coarsely each kind of detail was rounded. The "quality" is just a convenient dial that produces those tables. This guide explains the tables and what can, and cannot, be read back from a file.
How JPEG throws information away
A JPEG encoder splits the picture into 8 × 8 pixel blocks, converts each block into 64 frequency values (a discrete cosine transform), and divides each value by an entry of a quantisation table before rounding. Large table entries mean heavy rounding, so that frequency loses detail. Fine detail, the high frequencies, gets the largest entries, because the eye notices their loss least. The tables are stored in the file in DQT segments, so a decoder can multiply back. The rounding itself is the lossy step.
Colour is usually handled separately: the picture is turned into brightness and two colour channels, the colour channels are often stored at lower resolution (chroma subsampling), and each channel has its own table.
Where the 1-100 number comes from
The JPEG standard (ITU-T T.81) gives example tables in its Annex K. The widely used libjpeg library defines quality as a scale of those example tables: for quality below 50 the scale factor is 5000 divided by the quality, otherwise 200 minus twice the quality, and each table entry is the example entry times the factor, rounded and kept between 1 and 255. Quality 50 uses the example tables as they are; higher numbers shrink the entries, so less is rounded away.
Many programs copy that rule, which is why a file saved with a library-based encoder often has tables that match a quality number exactly. Others use their own tables or their own mapping from slider to tables, so "quality 80" in one program is not "quality 80" in another.
What an estimator can tell you
The JPEG Quality Estimator reads the tables from your file and compares them to the standard tables scaled for each quality from 1 to 100. If one quality matches every entry, the tables are the libjpeg-style tables for that number. If none matches, the encoder used custom or optimised tables, and the nearest number is only an approximation.
It cannot tell you the slider position in the program that saved the file, how many times the file was saved before, or how good the picture looks. A picture compressed at low quality and then re-saved at high quality has high-quality tables and low-quality content.
Other things the file declares
- Chroma subsampling. 4:4:4 keeps colour at full resolution; 4:2:2 halves it horizontally; 4:2:0 halves it in both directions and is common for photos.
- Baseline or progressive. Baseline JPEG draws the picture from top to bottom; progressive draws a rough version first and refines it, which can help on slow connections and sometimes saves a little space.
- Metadata segments. Exif (camera and location), XMP, ICC colour profiles and comments sit alongside the image data. See what image metadata reveals.
Using this when you save images
To keep size under a limit, resize first, then compress; see how to reduce an image for email and the web and the JPG compressor. Re-saving a JPEG always rounds again, so avoid saving the same file many times. For lossless work use PNG, and read JPG vs PNG vs WebP to choose a format.
Signed provenance data about how a file was made is something different; the C2PA checker reads it, and the quantisation tables are only a hint about compression history.