PROMPT GUIDE
How to Extract a Prompt from an Image (Metadata and Tag Guessing)
When you want to know the prompt behind a picture, first check whether the image still carries its generation data. If it does, you can read the exact text. If not, you can only guess tags that get you close. This guide covers both methods and what to do when they fail.
Last updated: approx. 4 min read
The short answer
There are two ways to get a prompt from an image. If the PNG still holds its generation data, you can read it out as is; if not, a tagging tool can guess words that describe the picture. When the image belongs to someone else, respect what the creator intended.
How do you extract a prompt from an image? (Two methods)
Read the generation data if it is still there; if not, guess tags from the picture.
PNG files saved from Stable Diffusion interfaces (AUTOMATIC1111, Forge, ComfyUI and others) or from NovelAI often carry the prompt, negative prompt, seed, size and other settings as embedded text. This is called metadata. You cannot see it in the picture, but the right tool can read it. Images posted on social media or converted to JPEG or WebP usually lose this data. In that case the only option is a tool that looks at the picture and guesses Danbooru-style tags, so you can build a similar prompt.



How do you read the generation data left in a PNG?
Just drop the original PNG into a tool that reads generation data. The PNG Metadata Viewer on this site does it entirely inside your browser.
Steps to read the generation data
- Get the original PNG if you can (images saved from social media or screenshots usually lost it)
- Open the PNG Metadata Viewer page and drop the image in
- Check whether fields such as prompt, negative prompt, seed and size appear
- Copy the parts you need into your notes or your prompt box
- To get the same picture again, also match the model, size and seed (the prompt alone will not reproduce it)
Rinka's tips
- Re-saving, compressing or converting an image removes the generation data. Always read it from the file before any conversion
- ComfyUI images may store the whole workflow instead of a single prompt. Drop the image into ComfyUI to load every step
- If you want to remove the data before sharing your own image, re-save it with the image compressor and no metadata will remain
How seed values let you redraw the same picture: What Is a Seed? Fixed, Random, and Reproducing the Same Image →
How do you guess tags from an image with no generation data?
Use a tool that reads the picture and outputs tags (a tagger), then tidy the tags yourself.
A tag-guessing tool looks at the picture and outputs tags such as 1girl, long hair and school uniform, each with a confidence score. Some run as extensions inside a Stable Diffusion interface, some as ComfyUI nodes, some on the web; names and usage change between versions, so check each tool's own documentation. Rather than using the output as is, reorder the tags as number of people, appearance, outfit, pose, background and style, and delete low-confidence or unrelated tags. The prompt becomes much easier to use.
What if you cannot extract the prompt? (Common mistakes and fixes)
The most common cause is that the generation data was lost when the image was converted or posted.
Is it okay to pull prompts from other people's work? (Things to keep in mind)
Reading to learn is one thing, but avoid copying the work itself or using it in ways the creator would not want.
- Whether a creator shares generation data is their choice. Being able to read it does not mean you may use it freely
- Avoid adding series, artist or character names to copy someone else's style or character
- When you use a prompt as a reference, rebuild it around what you want to draw
- Every posting site and service has its own rules, so check the terms where you post
To look up what a guessed tag means: How to Look Up Danbooru Tags (Finding the Correct Tag Name) →
To turn tags into a sentence prompt: Tag Prompts vs Natural Language Prompts (Which to Use?) →
Copy-paste: a template for tidying guessed tags
Reorder guessed tags in this order to make them easier to use. Replace the parts in brackets.
1girl, solo, [hair length and style], [eye color], [outfit], [pose], [expression], [place], [light], [framing]1girl, solo, long hair, red eyes, white sweater, sitting, smile, library, window, sunlight, upper bodyFAQ
Frequently Asked Questions
How do I extract a prompt from an image?
If the original PNG still holds its generation data, drop it into a tool like the PNG Metadata Viewer and read it out. For images without data, use a tag-guessing tool to build similar tags.
Can I read the prompt of an image saved from X or pixiv?
Posted images are usually converted, so the generation data is often gone. Unless the creator wrote the prompt in the description, guessing tags is the realistic option.
Why does the extracted prompt not give the same picture?
To get the same picture you also need the same model, size, seed, sampler and step count. The prompt alone produces a different image.
How do I remove generation data from my own images?
Re-saving with an image compressor redraws the image, so no metadata remains. Save the generation data separately first if you want to keep it.
RINKA WORLD
Play in Rinka World
MORE