DCT Block Viewer

Visualizes the Discrete Cosine Transform coefficients of JPEG 8×8 blocks — AC energy, the DC component and block boundaries. An exploration tool: it shows you the block structure, it does not return a verdict.

Drag & drop a file here, or

JPG PNG WebP GIF BMP AVIF Max 50MB • Processed in browser

Runs in your browser

8×8 Block DCT

Computes the Discrete Cosine Transform on every 8×8 pixel block — the same transform JPEG uses for compression.

Block Energy Statistics

Reports mean AC energy per block, its spread, the zero-coefficient ratio and how many blocks sit far from the mean — figures you read alongside the map, not a verdict.

100% Private

All analysis runs locally in your browser via Web Worker. Nothing is uploaded to any server.

Advertisement

How it works

How DCT coefficient analysis works

JPEG compression divides an image into 8×8 pixel blocks and applies the Discrete Cosine Transform to each one. This converts spatial pixel data into frequency coefficients — the DC component captures average brightness, while AC coefficients capture edges and texture. The DCT Block Viewer recomputes this transform on the decoded pixels and visualizes the result as a map: per-block AC energy, the DC component, or the strength of the 8×8 boundaries. Because it reads decoded pixels rather than the quantized values stored in the file, it describes the block structure you can see — it does not recover the quantization tables and does not tell you how many times the file has been saved. For compression-level error analysis, combine with the ELA Scanner.

What the block map shows

AC energy is the amount of high-frequency detail in a block, so the map is mostly a picture of content: edges, hair, foliage and text run hot, skies and walls run cool. What is worth looking for is a block that differs sharply from its neighbours in a region that looks uniform, or a run of unusually strong 8×8 boundaries in one area of the frame — either can be worth investigating further, and neither is evidence on its own. For JPEG quality-level splice detection across image regions, use the JPEG Ghost Scanner.

Visualization modes explained

AC Energy shows the sum of absolute AC coefficients per block as a heatmap. It reads mostly as a detail map, since AC energy follows texture. DC Component visualizes the average brightness of each 8×8 block — useful for seeing the overall luminance structure. Blockiness highlights discontinuities at 8×8 block boundaries — these rise with coarse compression over smooth areas, and also wherever the image itself has hard edges. For a view of the same edges as brightness gradients rather than DCT coefficients, try the Luminance Gradient Scanner.

Who uses DCT analysis

Analysts use a block map as a first look at an unfamiliar file, alongside tools that do return a measurement. Students and researchers use it to see what the DCT actually does to an image — the same transform JPEG applies, made visible. Anyone comparing two versions of a photo can put the maps side by side and see where the block structure differs. For metadata-level verification, combine with the Authenticity Checker. For a complete forensic workflow, visit the photo forensics hub.

A DCT block map is a way of seeing compression structure, not of measuring it. If you need a figure, ELA shows error-level differences and the JPEG Ghost Scanner sweeps quality levels; to read the quantization tables as they are actually stored in the file, use JPEG Structure. For noise-level manipulation, use the Noise Analysis Scanner. For AI-generated image detection, try the AI Detector. All processing runs entirely in your browser — your images are never uploaded. Learn more in our articles on JPEG compression artifacts and JPEG ghost analysis.

Frequently Asked Questions

What are DCT coefficients?

DCT (Discrete Cosine Transform) coefficients are the frequency-domain representation of an 8x8 pixel block. JPEG compression converts each block from pixel values to 64 coefficients: one DC coefficient representing average brightness and 63 AC coefficients representing increasingly fine detail. These coefficients are then quantized to reduce file size.

Does this detect double compression?

No, and it is worth saying why. This tool DCTs the decoded pixels, so the quantized coefficients a double-compression test needs were never read — they are destroyed when the browser decodes the file. An earlier version of this page reported a periodicity score against that data; measured against controls it ordered images by final JPEG quality rather than by number of saves, so it was removed rather than re-tuned. To read what is actually stored in the file, use JPEG Structure.

What do the three visualization modes show?

AC Energy shows the total high-frequency content per block as a heatmap, so detailed areas run hot and smooth ones run cool. DC Component shows the average brightness of each block. Blockiness highlights discontinuities at 8x8 block boundaries, which are stronger in heavily compressed images.

Does this only work on JPEG images?

It runs on any format the browser can decode, and the map is valid frequency content in every case. The 8x8 grid is only meaningful for JPEG, though — PNG and WebP do not use it, so the block boundaries the Blockiness mode draws are an arbitrary grid laid over an image that was never divided that way.

What does the zero coefficient ratio mean?

The zero coefficient ratio is the proportion of AC coefficients that are zero (or near-zero) after the DCT. Higher ratios indicate more aggressive compression — the quantization step was large enough to zero out many coefficients. Typical values range from 0.3 for high-quality JPEGs to 0.8 or higher for heavily compressed images.

Is my image uploaded to a server?

No. All DCT analysis runs entirely in your browser using a Web Worker. The image never leaves your device. No data is transmitted, stored, or logged.

What resolution is the image analyzed at?

Images larger than 1500 px on the long edge are scaled down to that size before the transform runs, so a very large photo is examined at working resolution rather than at full size. This matters more here than elsewhere: rescaling destroys the original 8x8 JPEG block alignment, so on a downscaled image the block grid is the tool's own, not the encoder's. The Analysis Details panel reports both the uploaded dimensions and the resolution the blocks were actually taken from. Images smaller than 50 x 50 px are rejected.