Is it possible to tell the quality level of a JPEG?

  1. JPEG is a lossy format. Every time you save a JPEG same image, regardless of quality level, you will reduce the actual image quality. Therefore even if you did obtain a quality level from the file, you could not maintain that same quality when you save a JPEG again (even at quality=100).

  2. You should save your JPEG at as high a quality as you can afford in terms of file size. Or use a loss-less format such as PNG.

Low quality JPEG files do not simply become more blocky. Instead colour depth is reduced and the detail of sections of the image are removed. You can't rely on lower quality images being blocky and looking ok at smaller sizes.

According to the JFIF spec. the quality number (0-100) is not stored in the image header, although the horizontal and vertical pixel density is stored.


You can view compress level using the identify tool in ImageMagick. Download and installation instructions can be found at the official website.

After you install it, run the following command from the command line:

identify -format '%Q' yourimage.jpg

This will return a value from 0 (low quality, small filesize) to 100 (high quality, large filesize).

Information source