StripShot/Guides/How Metadata Removal Works

Technical · Deep Dive

How AI Metadata Removal Actually Works: Binary vs Canvas

Updated April 2026

The core difference

Binary-level removal strips metadata bytes from the raw file without touching the image data. Canvas re-encodingredraws the image and saves a new file. Binary-level has zero quality loss and can remove C2PA. Canvas can't remove C2PA and introduces compression artifacts.

Understanding how metadata removal actually works helps you choose the right tool and understand why some tools miss C2PA while others catch it. Here's the full technical picture.

How a JPEG file is structured

A JPEG file is a sequence of segments. Each segment starts with a two-byte marker: 0xFF followed by a type byte. The structure looks like this:

JPEG segment structure

FF D8SOIStart of Image — always first 2 bytes
FF E0APP0JFIF header — basic image info
FF E1APP1EXIF data or XMP metadata
FF EBAPP11C2PA Content Credentials (JUMBF)
FF EDAPP13IPTC / Photoshop data
FF E2APP2ICC color profile
FF FECOMComment segment
FF DASOSStart of Scan — image pixel data begins here
FF D9EOIEnd of Image

Everything before the SOS segment is metadata. The SOS segment and everything after it is pixel data. Binary-level removal reads the file byte by byte, keeps the segments it wants, skips the ones it doesn't, and writes a new file. The SOS segment (image data) is always kept unchanged.

Binary-level removal: how it works

The process in pseudocode:

// Read raw bytes
buf = readFileAsArrayBuffer(file)
// Parse segment list
segments = parseJPEGSegments(buf)
// Filter: keep only what we want
kept = segments.filter(seg => {
if (seg.marker === 0xEB) return false // drop C2PA
if (seg.marker === 0xE1) return false // drop EXIF/XMP
if (seg.marker === 0xDA) return true // KEEP image data
return true
})
// Reassemble: concatenate kept segments
output = concatenate([SOI, ...kept])

The image data (SOS and beyond) is copied byte-for-byte. No decoding. No re-encoding. The output file has identical pixel data to the input — different only in the metadata bytes that were removed.

Canvas re-encoding: why it misses C2PA

The canvas approach:

// Create an image element and load the file
img = new Image()
img.src = URL.createObjectURL(file)
// Draw onto canvas — browser decodes JPEG here
canvas.getContext('2d').drawImage(img, 0, 0)
// Export as new JPEG — browser re-encodes
canvas.toBlob(blob => save(blob), 'image/jpeg', 0.95)
// Result: new JPEG with no metadata
// Problem: C2PA is not pixels. APP11 was never drawn.
// If not explicitly stripped before draw: APP11 may remain in browser memory
// Also: JPEG compression applied again = quality loss

The canvas element operates on pixels only. APP11 is not pixels — it's a binary metadata container. The canvas cannot see it, cannot strip it, and cannot re-create it. In most implementations the new JPEG simply starts fresh with no APP11, which achieves C2PA removal as a side effect. But it also applies compression again, and some browser implementations do write minimal EXIF back into the new file.

PNG and WebP metadata: different structure, same principle

PNG files use a chunk-based structure. Each chunk has a 4-character type name. Metadata chunks include eXIf (EXIF), iTXt (XMP and text), tEXt (plain text), zTXt (compressed text), and iCCP (ICC profile). C2PA in PNG lives in custom chunks: caBX, caMs, and caSt.

PNG chunk filtering

KEEP = ['IHDR', 'PLTE', 'IDAT', 'IEND', 'tRNS', 'bKGD', 'pHYs', ...]
STRIP = ['eXIf', 'iTXt', 'tEXt', 'zTXt', 'iCCP', 'caBX', 'caMs', 'caSt']
// Walk chunks, keep only KEEP list
output = chunks.filter(c => KEEP.has(c.type))

The IDAT chunk contains the compressed pixel data and is always kept. Removing caBX/caMs/caSt is what strips C2PA from PNG files at binary level.

Why the method matters for AI images in 2026

Instagram AI label

Triggered by C2PA in APP11. Canvas tools may not remove this specifically. Binary-level targets APP11 directly.

Image quality for professional use

Canvas re-encoding degrades JPEG quality each pass. For portfolio images, stock, or print, binary-level is the only method that preserves original quality.

AI prompt privacy

Stable Diffusion embeds prompts in PNG tEXt chunks. Canvas tools may or may not strip these depending on implementation. Binary-level stripping removes all non-required chunks.

Ghost Mode prerequisite

Ghost Mode injects new EXIF after stripping. This requires the file to be a valid JPEG with known structure — only possible after binary-level processing, not canvas re-encoding.

Frequently asked questions

What is binary-level metadata removal?

Binary-level removal identifies metadata segments in the raw file bytes and removes them without touching the image data. For JPEG files, this means finding APP markers (0xFF 0xE0 through 0xFF 0xEF, 0xFF 0xFE) and skipping them when rebuilding the file. The image data in the SOS segment (0xFF 0xDA) is never touched.

What is canvas-based metadata removal?

Canvas-based removal draws the image onto an HTML canvas element using drawImage(), then exports it via toBlob() or toDataURL() as a new file. The new file contains no metadata because it was never written. However, the image data goes through JavaScript's image decoder, the canvas renderer, and then JPEG encoder — each step potentially degrading quality.

Does binary-level removal work for C2PA?

Yes. C2PA lives in JPEG APP11 (byte marker 0xFF 0xEB). Binary-level removal identifies this marker and skips the segment when rebuilding the JPEG. In PNG files, C2PA is in caBX, caMs, and caSt chunks — binary removal skips these chunks while preserving IHDR, IDAT, and other required chunks.

Can canvas removal remove C2PA?

No. The canvas element draws the decoded image pixels. It has no awareness of the file structure or what APP11 segments contain. Canvas re-encoding creates a new JPEG from pixels alone — C2PA data is not pixels, it's a metadata container, so it doesn't get drawn and doesn't appear in the output.

Which method does StripShot use?

StripShot uses binary-level removal exclusively. It parses the raw file bytes, identifies metadata segments by their byte markers, and rebuilds the file without them. The image data is never decoded, never drawn, never re-encoded. Quality is bitwise identical to the original.

Binary-level. Free to try.

StripShot — the correct way to remove metadata.

3 free strips/day. No account. No quality loss. C2PA removed.

Open StripShot free →

Comparison

Best AI Metadata Remover 2026

Instagram

Remove the Made with AI Label