All guides

PNG metadata: the prompt your AI image carries

PNG metadata is text stored inside a PNG file, next to the picture. AI image tools use it to save how a picture was made: the full prompt, the negative prompt, the seed, the model and every setting, readable by anyone who gets the file. MetadataLab's AI metadata remover shows the saved prompt and removes it together with Content Credentials and AI tags, in your browser, and the pixels of the clean copy are identical to the original.

7 min readUpdated by the MetadataLab team

Do it now with the AI metadata removerContent Credentials, AI tags and saved prompts. Free, in your browser. Your file is not uploaded.
PNG metadata in an AI image: the viewer shows the prompt, negative prompt and settings that a Stable Diffusion tool saved inside the PNG file
A sample PNG saved the way Stable Diffusion web UIs save theirs. The prompt is in the file, and the viewer shows the start of it.

How a PNG stores text

A PNG file is a chain of blocks called chunks. Some hold the picture. Others hold text. The PNG specification provides the tEXt, iTXt and zTXt chunks for storing text strings associated with the image, such as a description or a copyright notice. Each one is a keyword and a value, like "Author" and a name.

The text can be as long as the app likes, and there is no rule about what the keyword is. That makes PNG text chunks a handy place for an app to leave notes for itself. A newer chunk, eXIf, can also hold camera-style EXIF data.

None of this shows when you open the picture. A file manager shows the size and the date, and the text stays out of sight.

Stable Diffusion: the parameters chunk and PNG info

The AUTOMATIC1111 web UI, and the many tools that follow its format, save the generation settings into every PNG. Its documentation lists the feature under the name PNG info and says it adds information about generation parameters to PNG as a text chunk.

In practice that chunk holds the prompt, the negative prompt, the number of steps, the sampler, the CFG scale, the seed, the image size and the model with its hash. With the file in hand, someone can load those Stable Diffusion parameters and make the same picture again, or a close variation.

ComfyUI: the whole workflow

ComfyUI saves more. Its documentation says that for PNG output the values are written as text entries, and the standard field names are prompt and workflow. The workflow entry is the full node graph: every node, every connection, every file name of a model or LoRA you loaded.

That is a feature when you want to share a workflow, since the picture is the workflow. It is a leak when the graph took you three weeks to tune. ComfyUI has a switch for it: starting it with --disable-metadata stops the entries from being written.

ComfyUI PNG metadata: two text entries, prompt and workflow, read from a PNG file with the node graph in JSON
A sample PNG with ComfyUI-style entries. Both lines are JSON: one with the sampler settings and prompts, one with the node list.

NovelAI metadata: text and a copy in the pixels

NovelAI does something extra. Besides the text in the file, it writes a second copy of the settings into the picture itself. NovelAI's own tool for reading it says it extracts prompt information and other settings from the alpha channel of generated images, where it is stored in what the project calls the stealth pnginfo format.

The alpha channel is the transparency layer of a PNG. Data hidden there is part of the image, so it survives when the text chunks are removed. A JPEG has no alpha channel at all, which is why that copy does not carry over when the picture is converted to JPG.

NovelAI's FAQ also notes that images saved with right-click and save do not contain metadata. How you download decides what you get.

Other AI image metadata

The large hosted generators mostly use a different mechanism. They sign the file with C2PA Content Credentials and set the IPTC tag that says "made with AI", and some add an invisible watermark to the pixels. Those are what social platforms read when they label a post.

Midjourney describes its own marker as a small ID tag hidden inside the file, one that screenshots, edits and most social media sites remove.

So "AI image metadata" can mean three things: a saved prompt, a signed record, or a tag. One PNG can hold all three.

How to read the metadata of a PNG

Drop the file on the metadata viewer. A saved prompt appears under "AI prompt and settings" with the start of the text written out. Content Credentials and AI source tags are listed by name. The file is read in your browser and nothing is changed.

The web UIs can read their own files too. AUTOMATIC1111 has a PNG Info tab that shows the parameters of a picture you drop on it, and ComfyUI loads the workflow when you drag a PNG onto the canvas.

How to remove metadata from a PNG

The AI metadata remover removes the text entries, the XMP block and any Content Credentials from a PNG, and copies the picture data as it is. Nothing is re-compressed, so the pixels are identical. Five images a day are free with no account.

The pixels stay untouched, the alpha channel included. For a NovelAI picture, where a copy of the settings sits in that channel, convert the picture to JPG with the image converter as well: a JPG has no alpha channel to carry it.

Many sites strip PNG text on upload or turn the picture into a JPEG, and then the prompt is gone by accident. Do not rely on it. Sites built for sharing AI art often keep the text on purpose and show it next to the image.

Remove metadata from a PNG: the saved AI prompt and settings found in the file and removed, with the clean copy checked again
The same sample after cleaning. The file size is the same to the kilobyte, because only the text entry was taken out.

Should you remove it?

Keep it in your own archive. Six months from now the prompt in the file is the only record of how you made the picture.

Remove it from what you publish or deliver, unless sharing the recipe is the point. A client who buys an illustration does not need your negative prompt, and a marketplace listing does not need the name of your LoRA. (If the job is a brand mark, Leapd has a free AI logo generator that hands over clean files.)

If the picture is going on Instagram or Facebook, the prompt is not what gets it labeled. The label comes from the AI markers described in why Instagram shows AI info.

Ready? Open the AI metadata removerContent Credentials, AI tags and saved prompts. Free, in your browser. Your file is not uploaded.

Tools that go with this guide

Questions people ask

What is the best PNG metadata remover for AI images?

MetadataLab's AI metadata remover shows the prompt, seed and settings saved in a PNG and removes them with any Content Credentials and AI tags, in your browser. The picture data is copied without re-compression, so the clean PNG is pixel-identical to the original.

What is PNG info?

The name the AUTOMATIC1111 Stable Diffusion web UI uses for the generation settings it saves inside each PNG, and for the tab that reads them back. It covers the prompt, negative prompt, seed, sampler, steps and model.

What are PNG chunks?

The blocks a PNG file is built from. Some hold the picture and some hold extras such as text, a color profile or EXIF data. AI tools save prompts in the text chunks.

Does a PNG from ChatGPT or Gemini contain my prompt?

Those tools mark their images as AI-made in other ways, with Content Credentials or a watermark in the pixels. To see what a specific file holds, drop it on the metadata viewer. A saved prompt would be listed under "AI prompt and settings".

Does converting a PNG to JPG remove the prompt?

Usually, because the text chunks are a PNG feature and most converters do not copy them. The picture is also re-compressed, which costs some quality. Removing the metadata from the PNG keeps the pixels identical.

How do I remove NovelAI metadata?

The text in the file comes out with the AI metadata remover. NovelAI also stores a copy in the alpha channel of the image, which is part of the pixels. Converting the picture to JPG leaves that copy behind, because a JPG has no alpha channel.

Can someone recreate my image from the metadata?

With the prompt, seed, model and settings from a Stable Diffusion PNG, someone with the same model can produce the same or a very similar picture. That is what the saved parameters are for.

Built with Leapd