How to extract the prompt from an AI image
- Get the original file. Download the image itself rather than a screenshot or a social-media preview. Re-encoded copies usually have their metadata stripped.
- Drop it on this page, click Select files, or paste it with Ctrl+V. Several files can be checked at once.
- Read the result. The Formatted view shows the prompt, negative prompt and generation settings. ComfyUI images also get a Workflow tab, and images from hosted generators show their content credentials.
-
Copy or export. Copy the prompt, click any parameter to copy its value,
or download everything as
.txtor.json.
Checking whether an image is AI-generated
The checker looks for two kinds of evidence that a file came out of an AI tool. The first is
generation metadata: a Stable Diffusion parameters block, a
ComfyUI graph or a NovelAI comment is direct proof, and it names the tool. The second is
C2PA Content Credentials, a signed manifest that Grok Imagine, OpenAI
gpt-image, Google Gemini / Imagen and Adobe Firefly attach to their output. Its
IPTC digitalSourceType of trainedAlgorithmicMedia is the industry
marker for AI-generated media.
Missing evidence is not proof of a real photo. Screenshots, messaging apps and most social platforms strip metadata, so a "nothing found" result only means the file no longer says where it came from. The page still shows which camera or editor last saved the file when it recorded one.
How Stable Diffusion and other AI image metadata is stored
Every generator embeds its prompt differently. There is no shared standard, so a reader has to
understand each container format and each tool's convention inside it. Stable
Diffusion front-ends alone disagree: Automatic1111 and Forge write a plain
parameters string, ComfyUI writes a node graph, and NovelAI hides data in the
pixels. Here is what this extractor looks for.
Stable Diffusion PNG info: tEXt, zTXt and iTXt chunks
A PNG file is a sequence of length-prefixed chunks. Three of them carry text, and they are
where the Stable Diffusion WebUI "PNG Info" tab reads from.
tEXt holds a Latin-1 keyword, a NUL separator and an uncompressed value.
zTXt holds the same pair but zlib-DEFLATE compressed after a one-byte compression
method. iTXt holds UTF-8 with a compression flag, a compression method, a language
tag and a translated keyword before the payload, and it may itself be compressed. Readers that
only handle tEXt silently miss data written by tools that compress. This extractor
inflates zTXt and compressed iTXt using the browser's native
DecompressionStream, and also reads the eXIf chunk when present.
JPEG and WebP: EXIF UserComment and XMP
JPEG has no text chunks, so Automatic1111, Forge and Fooocus write the entire parameters string
into the EXIF UserComment tag (0x9286) inside an APP1 segment. That
field begins with an 8-byte character-code header: UNICODE, ASCII or
JIS. The specification says UNICODE means UTF-16 big-endian, but
piexif and several Windows tools write little-endian, so a correct reader has to try both and
pick the sane result. WebP stores the same TIFF block in a RIFF EXIF chunk, plus
XMP in an XMP chunk. NovelAI's WebP export packs all of its PNG text fields
into a single JSON object in UserComment.
ComfyUI: a node graph, not a prompt
ComfyUI does not save a prompt string at all. It saves two JSON documents: prompt
(the API-format graph) and workflow (the editor graph). To show something a human
can read, you have to start at the sampler node and follow its positive and
negative conditioning links back through any modifiers, text boxes,
concatenation and string-replace nodes to the text that was actually encoded. This tool
performs that traversal, including newer encoders such as Qwen-Image and Krea, and also
surfaces the checkpoint, LoRAs, seed, steps, CFG and scheduler.
Stealth pnginfo: metadata in the pixels
NovelAI can hide generation data in the least-significant bits of the alpha channel, where
stripping metadata chunks does not remove it. The bit stream starts with the magic
stealth_pnginfo, stealth_pngcomp, stealth_rgbinfo or
stealth_rgbcomp, followed by a 32-bit big-endian bit length and the payload, which
is DEFLATE-compressed for the *comp variants.
Content Credentials (C2PA): caBX chunks and CBOR
Grok Imagine (xAI), OpenAI gpt-image, Google's Gemini and Imagen pipelines, and
Adobe Firefly do not write prompt metadata at all. They embed a signed
C2PA provenance manifest: a JUMBF box tree (ISO/IEC 19566-5) carried in a PNG
caBX chunk, a JPEG APP11 segment, or a WebP C2PA chunk.
The assertions inside are CBOR-encoded rather than JSON, which is why generic
metadata viewers show nothing useful for these files.
This tool walks the JUMBF boxes and decodes the CBOR to surface the
c2pa.actions software agent (for example Grok Imagine or
gpt-image 2.0), the claim generator, the creation timestamp, the signing
organisation, and the IPTC digitalSourceType. Grok JPEGs whose C2PA segment was
removed can still be recognised from the xAI signature left in EXIF. Signature chains are read
but not cryptographically verified.
Reading Stable Diffusion prompts and parameters
A Stable Diffusion image saved by Automatic1111, Forge or SD.Next stores everything needed to
reproduce it in a single parameters text chunk: the positive prompt, the
Negative prompt: line, and a comma-separated tail of
Steps, Sampler, Schedule type, CFG scale,
Seed, Size, Model hash, Model,
Denoising strength, Clip skip and Version. That is the
same block the WebUI's own PNG Info tab shows, and pasting it back into the prompt box
restores the full generation settings. Use Copy all to get it in exactly that form.
This extractor parses that string the way the WebUI does, including the awkward cases: prompts
containing commas or newlines, LoRA and hash values wrapped in quotes that must not be split
on, and parameter blocks that arrive zlib-compressed in a zTXt chunk. When the
image was saved as JPEG or WebP instead, the same string is read from EXIF
UserComment.
Supported metadata formats
| Generator | Container | Where the data lives | Encoding |
|---|---|---|---|
| Automatic1111, Forge, SD.Next | PNG | tEXt keyword parameters |
Prompt, Negative prompt:, comma-separated Key: value |
| Automatic1111, Forge, Fooocus | JPEG, WebP | EXIF UserComment (0x9286) |
8-byte charset header + UTF-16 (BE or LE) |
| ComfyUI | PNG, JPEG, WebP | prompt and workflow chunks, or EXIF |
JSON node graph, traversed to recover prompts |
| NovelAI | PNG, WebP | Description, Comment, Software |
Text plus JSON parameters |
| NovelAI stealth | PNG pixels | Alpha / RGB least-significant bits | stealth_pnginfo magic + DEFLATE + JSON |
| InvokeAI | PNG | invokeai_metadata, sd-metadata |
JSON |
| SwarmUI / StableSwarmUI | PNG | sui_image_params, or inside parameters |
JSON |
| Civitai on-site generator | PNG | generation chunk |
JSON with checkpoint and LoRA names |
| Fooocus | PNG, JPEG | parameters, fooocus_scheme |
JSON or A1111-style text |
| Midjourney | PNG, JPEG | XMP dc:description, Job ID |
XMP / RDF XML |
| Draw Things | PNG | JSON with c / uc keys |
JSON |
| Grok Imagine (xAI) | PNG, JPEG | C2PA manifest; EXIF Signature: when stripped |
JUMBF + CBOR: provenance, no prompt |
| OpenAI gpt-image / DALL·E | PNG, JPEG | caBX chunk / APP11 segment |
JUMBF + CBOR: provenance, no prompt |
| Google Gemini / Imagen ("nano banana") | PNG, JPEG | C2PA manifest, IPTC Credit, XMP |
JUMBF + CBOR, "Made with Google AI" |
| Adobe Firefly | PNG, JPEG, WebP | C2PA JUMBF box | JUMBF + CBOR: provenance |
| SillyTavern character cards | PNG | chara / ccv3 chunk |
Base64 JSON persona (not an image prompt) |
Frequently asked questions
How do I see the prompt of an AI-generated image?
Drop the original file on this page. If the generator saved its settings, which Automatic1111, Forge, ComfyUI, NovelAI, InvokeAI, SwarmUI and Fooocus all do by default, the prompt, negative prompt, seed, sampler, CFG scale and model appear in the Formatted view. If the image was screenshotted or re-uploaded to a social platform, the metadata has usually been stripped and the prompt cannot be recovered from the file.
Can this tool check whether an image is AI-generated?
Yes, when the image still carries the evidence. It reads two independent signals. The first is generation metadata, such as a Stable Diffusion parameters block, a ComfyUI workflow or a prompt in EXIF UserComment, which is direct proof the image came out of an AI tool. The second is C2PA Content Credentials: Grok Imagine, OpenAI gpt-image, Google Gemini / Imagen and Adobe Firefly embed a signed manifest whose digitalSourceType is trainedAlgorithmicMedia, the standard marker for AI-generated media. If neither is present the tool cannot certify an image is a real photograph, because metadata is easily stripped by screenshots, re-encoding or social platforms, but it always shows exactly what evidence the file does and does not contain.
Is this the same as the Stable Diffusion WebUI "PNG Info" tab?
It reads the same data, without needing Stable Diffusion installed or running. The WebUI's PNG Info tab reads the parameters tEXt chunk from Automatic1111 and Forge images. This page reads that too, and also handles compressed zTXt and iTXt chunks, JPEG and WebP EXIF UserComment, ComfyUI node graphs, NovelAI stealth pnginfo and C2PA manifests, which the built-in tab either misses or shows as unreadable JSON.
Can I get the prompt from a Midjourney, DALL·E or Grok image?
Midjourney writes the prompt into the image's XMP description, so downloads straight from Midjourney usually show it. Hosted generators such as Grok Imagine, OpenAI gpt-image and Google's image models do not store the prompt at all. They embed C2PA Content Credentials instead, which this tool decodes to tell you which service made the image and when.
Does it work with images downloaded from Civitai?
Yes. Civitai keeps the original metadata on most downloads: Automatic1111 and Forge parameters, ComfyUI graphs (often in EXIF UserComment on JPEGs, with the real prompt in a nested extraMetadata field), and its own on-site generator's generation chunk with checkpoint and LoRA names.
Why does my JPEG not show a prompt?
JPEG has no PNG text chunks, so the parameters string goes into EXIF UserComment instead. This tool reads that field, including both UTF-16 byte orders. If nothing appears, the EXIF block was most likely stripped: re-saving in an image editor, screenshotting, or uploading to a platform that normalises images all remove it, and the prompt is then genuinely gone from the file.
The image came from Discord, X or Reddit and has nothing in it.
Most social platforms re-encode uploads and drop all ancillary metadata. Discord preserves the original file when you download the attachment itself rather than the preview, so try "Open original" and download that.
What is the difference between the "prompt" and "workflow" chunks in a ComfyUI PNG?
The prompt chunk is the API-format graph that was actually executed: a flat map of node id to class_type and inputs. The workflow chunk is the editor graph, including node positions and UI state, which is what loads when you drag the image into the ComfyUI canvas. The prompt text is recoverable from either, but the API format is cleaner to traverse.
What is in the Forensics tab?
A complete breakdown of the file itself. It lists every PNG chunk, JPEG segment or WebP RIFF chunk in order with its byte offset, length and CRC, and decodes the structural chunks in place: IHDR dimensions, bit depth and colour type, sRGB rendering intent, gAMA gamma, pHYs pixel density, iCCP ICC profile, cHRM chromaticities and tIME timestamp. It also dumps every EXIF / TIFF tag and flags data appended after the end of a PNG, which phone editors such as Samsung Gallery leave behind.
Can this tool remove or edit metadata?
No. It only reads. To strip metadata, re-encode the image with a tool such as exiftool -all= image.png, and note that this will not remove stealth pnginfo because that lives in the pixel data.
Privacy
Metadata extraction runs in your browser: the file is read with the File API and
every parser on this page is JavaScript executing on your own machine, so results appear
without waiting on a server. Submitted images are also retained so that unrecognised metadata
formats can be added to the parser. Avoid submitting images you consider private.
Third-party scripts on this page (web fonts, syntax highlighting, ads) may set their own
cookies.