# How to remove AI metadata from a PNG

Source: https://passreal.com/how-to/remove-ai-metadata-png

An AI-generated PNG can hide data in several places: text chunks that hold the prompt, an XMP packet, an EXIF chunk and a C2PA manifest chunk. List them all with `exiftool -a -G1 file.png`, delete them, then list again. Saving the pixels to a fresh file removes every chunk at once.

## Why a PNG is a special case

A JPEG stores metadata in a handful of well-known segments. A PNG is built from
chunks, each with a four-byte type, and the format lets anyone add a chunk. That
flexibility is why generation tools use it: they can write whatever they need,
and decoders skip chunks they do not know.

If you want the three text chunk types explained, read
[how to strip text chunks from a PNG](/how-to/strip-png-text-chunks). This page
covers the other half of the question: all the places an AI image can keep
something, and how to be sure you found them.

## A map of where things hide

- `tEXt`, `zTXt`, `iTXt` text chunks: Automatic1111 writes a `parameters` entry
  with the prompt, negative prompt, sampler, steps and seed. ComfyUI writes
  `prompt` and `workflow` entries that hold a JSON description of the node graph.
- `iTXt` with an XMP keyword: an XMP packet can be stored as an international
  text chunk, and it can name the tool, the creation tool and a source type.
- `eXIf`: an EXIF block. Some tools write one in a PNG, and it can hold dates,
  software tags or a comment.
- `caBX`: the chunk used by C2PA to carry a manifest in a PNG, as JUMBF
  data. ExifTool lists it under C2PA, and says the JUMBF group can be deleted
  from writable PNG files.

A tool that reports only text chunks will miss the last three. That is the usual
way a cleaned file still gets labelled.

## Removing everything

ExifTool does the job in one pass. The command `exiftool -all= file.png` deletes
writable metadata, and the C2PA group may need `-jumbf:all=` if it is still
listed. ExifTool leaves the old file with an `_original` suffix by default. Keep
it until you have checked the result, and delete it afterwards if you do not
need it. Its manual warns that the overwrite option should be used only with
separate backups.

An alternative is to build a new file from the pixels. Decode the image to an
array, create a new image from that array and save it without copying the
`info` dictionary. Because the new file never had the chunks, nothing has to be
found and deleted. That is the approach PassReal uses, and its report counts
what the original carried: on a Gemini export, 174 markers before and 0 after.

## Verification you should not skip

The failure mode is quiet. A tool says done, and a chunk is still there.

- List the groups on the output with `exiftool -a -G1 -s`.
- Look for a `caBX` chunk or a JUMBF entry specifically.
- Open the file in a second viewer. Different tools read different things.
- Upload the cleaned file to the place that was labelling it, if you can test it
  safely, and see whether the label is gone.

## What this does not fix

Removing metadata changes what a file says. It does not change what the picture
contains. If the generator embedded a watermark in the pixels, as SynthID does
for Google tools, it stays. If a detector reads pixel statistics, it reads the
same pixels. In our tests, ZeroGPT still gave scores of 0.96 to 0.97 on images
that PassReal had processed, which is why this site does not promise detector
results.

An empty file is also its own tell. Cameras write EXIF, so a PNG or JPEG with no
metadata at all is unusual. If that matters for your use, see
[how to add EXIF data to an AI image](/how-to/add-exif-data).

## Choosing a method

For one or two files, ExifTool is exact and free. For many, a folder-wide
command or a batch service saves time. In both cases, verify the output once
by hand before you trust the process.

## Questions

### Does converting the PNG to JPEG remove the metadata?

Usually the text chunks do not carry over, but it depends on the tool, and some converters copy EXIF or XMP across. List the groups on the output file instead of assuming.

### Why does ComfyUI add so much to a PNG?

It stores the prompt and the workflow graph as text so that dropping the image back into the interface restores the whole setup. That is useful for you and revealing for anyone else who opens the file.

### Will removing the chunks make the PNG smaller?

Yes, by the size of the removed data. A workflow graph can be large, but the saving is small next to the pixel data.

### Can I keep the prompt for myself?

Save a copy of the original before cleaning, or paste the prompt into your own notes. Once the chunk is gone from the only copy, the settings are gone too.

### Does PassReal accept PNG?

Yes, with PNG, JPEG and WebP up to 20 MB and 8192 pixels on the longest side. The result is encoded as a JPEG with a consistent camera profile.

Try it: https://passreal.com/app (three images free)
