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
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:
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:
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
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 →