JPEG Ghost Scanner

Detects spliced regions in JPEG images by sweeping compression quality levels. Tampered areas saved at a different quality appear as "ghosts" in the difference map.

Drag & drop a file here, or

JPG JPEG JPEG only • Quality sweep 60–99 • Analyzed at up to 1500 px • Processed in browser

Compression Ghosts

Reveals regions saved at a different JPEG quality than the rest of the image, indicating splicing or compositing.

Quality Estimation

Sweeps quality levels 60–99 looking for a dip in the error curve. If the lowest error sits at either end of that range, no dip was bracketed and no estimate is reported. Images over 1500 px are scaled first, which makes the estimate unusable.

Diff Heatmap

Amplified difference map, brightest where re-encoding changed the image most. Sharp detail lights up too — a splice reads as a coherent patch with a border, not as scattered brightness.

100% Private

All analysis runs locally in your browser using Canvas API. Your image is never uploaded to any server.

Advertisement

How it works

How JPEG ghost detection works

Every JPEG image carries invisible traces of its compression level. When you re-save a JPEG at the same quality it was originally encoded, the error introduced is minimal — the image is already "adapted" to that quality. But if a region was pasted from a different JPEG saved at a different quality, that spliced region responds differently to recompression. The JPEG Ghost Scanner exploits this by re-encoding the image at every quality level from 60 to 99 and measuring pixel-by-pixel differences. At the estimated original quality, spliced regions can "glow" because they show higher error than the background — though so does any sharp detail, which is why the map is read for coherent patches rather than for brightness alone. Two limits are worth knowing before you read a result. The re-encoding uses your browser's own Canvas JPEG encoder and its quantization tables, not the tables stored in your file, so the estimated quality is a proxy for the original setting rather than a reading of it. And images larger than 1500 px on the long side are scaled down first: resampling rewrites the 8×8 blocks the whole technique depends on, so an estimate from a scaled image is not usable. The technique complements the ELA Scanner, which detects compression inconsistencies from a single re-save rather than a full quality sweep.

When to use this tool

JPEG ghost analysis is most effective when you suspect that parts of an image were copied from another JPEG and pasted into the current one — a technique known as splicing or compositing. Journalists use it to verify whether press photos have been manipulated. Insurance investigators check submitted damage photos for pasted elements. Social media researchers use it to detect fabricated screenshots and doctored evidence. The quality sweep chart also serves as a standalone tool for estimating the JPEG save quality of any image, which is useful for archival and quality assurance. For metadata-based tampering detection, combine this with the Authenticity Checker.

Reading the quality sweep chart

The quality sweep chart plots mean squared error at each re-encode quality from 60 to 99. A characteristic "dip" in the curve marks the estimated original save quality — at that level, re-encoding barely changes the image because it's already optimized for those quantization tables. A sharp, clear dip indicates a single-compression JPEG. A flat or noisy curve may indicate the image has been through multiple compression rounds or was converted from a non-JPEG format. If the lowest error lands on 60 or on 99 — the ends of the swept range — the curve never turned back up, so no dip was bracketed at all: the original quality may lie outside the range, and the scanner reports no estimate rather than printing the boundary value as one. Click any bar to view the ghost heatmap at that quality level. The Quality Analyzer provides additional quality metrics including sharpness, noise, and exposure analysis.

Combining forensic techniques

JPEG ghost analysis is strongest when combined with other forensic tools. The ELA Scanner reveals compression inconsistencies through error level amplification — a complementary approach that sometimes catches edits JPEG ghosts miss, and vice versa. The Thumbnail Scanner checks if the embedded EXIF thumbnail still matches the main image. The Stego Scanner detects hidden data encoded in pixel values. Together, these tools cover pixel-level, compression-level, metadata-level, and steganographic analysis — the four pillars of image forensics. Our photo authenticity guide walks through the complete verification workflow.

The JPEG ghost technique was introduced in academic forensic research as a way to detect double JPEG compression at different quality levels — a telltale sign of image splicing. When a forger takes a region from one JPEG (compressed at quality A), pastes it into another JPEG (compressed at quality B), and saves the result, the pasted region retains artifacts from quality A that conflict with the surrounding quality-B background. By re-encoding at quality B and computing the difference, the pasted region stands out because it hasn't adapted to quality B the way the background has. The quality sweep approach scans all levels to catch splices regardless of the specific quality mismatch. While not foolproof — sophisticated editors can re-save at matching quality or use non-JPEG source material — JPEG ghost analysis remains one of the most accessible forensic techniques for detecting image manipulation. Read it from the heatmap rather than from the summary percentage: the share of blocks that stand out is driven mostly by how much sharp detail a photo contains, and an untouched photograph with a lot of texture can report a higher share than an image that really was spliced. What distinguishes a ghost is its shape — a coherent region with a border that follows an object rather than the picture's detail. Combined with the AI Detector for synthetic content and the File Hash Scanner for verifying file integrity, it provides a thorough forensic toolkit. Read our JPEG ghost analysis guide for tips, examples, and best practices.

Frequently Asked Questions

What is a JPEG ghost?

A JPEG ghost is a visual artifact that appears when parts of a JPEG image were originally saved at a different compression quality than the rest. When you re-encode the entire image at a specific quality level and compute the difference from the original, regions that match that quality level show minimal error, while regions from a different quality level show higher error — they "glow" in the difference map, like ghosts.

How does the quality sweep estimate the original save quality?

The scanner re-encodes the image at every quality level from 60 to 99 and measures the mean error at each level. When a JPEG is re-saved at the same quality it was originally encoded, the error is minimal because the image is already adapted to those quantization tables. The quality level that produces the lowest mean error is the estimated original save quality, visible as a dip in the sweep chart.

What does it mean when regions glow in the heatmap?

Bright regions are where the pixel difference between the original and the re-encoded image is largest. A region pasted from a source saved at a different JPEG quality can show up this way — but so can any area of sharp detail, because edges, text and foliage recompress badly wherever they appear. Brightness alone is therefore not evidence. What points to splicing is shape: a coherent patch with a border that follows an object rather than following the picture's detail.

Why does the summary say the original quality was not determined?

The sweep looks for a dip — a quality where the re-encode error falls and then rises again. If the lowest error lands on 60 or on 99, the two ends of the swept range, the curve never turned back up and no dip was bracketed. The true original quality may lie outside the range, or the file may not be a single-compression JPEG at all. In that case the scanner reports no estimate instead of printing the boundary value, and the block figures beside it describe a re-encode at that boundary quality rather than at the original.

Does image size affect the result?

Yes, and it is the single biggest thing to watch. Images larger than 1500 px on the long side are scaled down before the sweep runs. Resampling recomputes every pixel and destroys the 8x8 block grid this technique reads, so the quality estimate describes the scaled copy and not your file — in testing, an image that dipped cleanly at quality 62 at native size reported a boundary value once scaled. The estimate does not degrade gradually, it disappears. The results table reports both the uploaded size and the size the analysis ran at, so you can always tell which case you are in.

Is the estimated quality read from the file itself?

No. The scanner never parses the quantization tables stored in your JPEG. It re-encodes the image with your browser's own Canvas JPEG encoder at each quality from 60 to 99 and picks the level with the lowest error, so the figure is a proxy for the original setting expressed in that encoder's scale. Different encoders map the 0-100 quality scale to different tables, so treat the number as an approximation rather than as a recovered setting.

Can this detect all types of image manipulation?

No. JPEG ghost analysis specifically detects regions saved at a different JPEG quality level. It will not detect edits where the source material was saved at the same quality, where the source was a PNG or raw file, or where the forger carefully re-saved to normalize compression across the image. Color adjustments, exposure changes, and clone-stamp edits within the same image also don't create quality-level ghosts. Combine with ELA, thumbnail analysis, and metadata inspection for comprehensive forensics.

Is my image uploaded to a server?

No. All processing happens entirely in your browser. The image is loaded onto an HTML Canvas element, re-encoded at each quality level using the Canvas API's native JPEG encoder, and the difference maps are computed in JavaScript. Nothing is transmitted, stored, or logged on any server. The quality sweep typically takes a few seconds depending on image size.

Complementary tools: ELA Scanner for error level analysis • Thumbnail Scanner for EXIF thumbnail mismatch • Authenticity Checker for metadata verification