How to use the Vision Payload Decoder tool
- Paste the request body into Vision request JSON. Any valid JSON that contains an image string works.
- Select Extract image to search the JSON.
- Look at the preview. The Result box shows the image size in bytes and its media type.
- Use the Download link to save the file as vision.png, vision.jpg, vision.gif or vision.webp.
How the vision payload decoder finds the image
Vision APIs do not agree on where an inline image goes. One format uses an image_url part with a data URL, another a source object with separate media type and data fields, a third an inline data object. Instead of knowing each schema, this tool visits every string in the document, in order, and tries to decode it as Base64 after removing a data URL header if there is one.
Each string that decodes is then checked for an image signature: the 8-byte PNG header, FF D8 FF for JPEG, GIF87a or GIF89a, or RIFF with WEBP. The first match wins. The media type declared in the JSON is not consulted, so the result tells you what the bytes are, not what the request claims.
Example: a chat request with a data URL
In the request below, the tool passes over the model name and the prompt, reaches the url string, strips data:image/png;base64, and decodes the rest to 70 bytes that start with the PNG signature. The download is named vision.png.
{
"model": "gpt-4.1-mini",
"messages": [{
"role": "user",
"content": [
{ "type": "text", "text": "Describe this image." },
{ "type": "image_url", "image_url": { "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==" } }
]
}]
}
Result: 70 bytes · image/pngWhat you can check with the preview
Seeing the decoded image answers questions that are hard to settle by reading code.
- Is it the right image, or a placeholder, a previous upload or a blank canvas capture?
- Was it resized or compressed as intended? The byte count shows the size the model received.
- Does the real type match the declared one? A request that says image/jpeg while the tool reports image/png is mislabeled.
- Did the Base64 survive logging and transport? A string truncated by a log limit fails to decode or shows a picture that is cut off.
Limits of the search
Only the first image is returned. If a request holds several, remove the earlier image parts from the JSON and run again to see the next one. Images referenced by http or https URLs are not fetched, and a request that contains only links ends with No supported Base64 image was found. Formats outside the four signatures, such as HEIC, AVIF, BMP or PDF pages, are not detected.
Because every string is tested, short ordinary words that happen to be valid Base64, such as user or text, count toward an internal cap of 100 decodable strings. A long conversation history can hit that cap and produce There are more than 100 Base64 values. Choose a smaller payload. Trim the messages array down to the message with the image and try again.
Frequently asked questions
Does the decoder work with request formats other than OpenAI's?
Yes, as long as the image is inline Base64. The search does not depend on field names, so a data string inside a source object or an inline data object is found the same way as a data URL in an image_url part.
Why does it say No supported Base64 image was found?
No string in the JSON decoded to PNG, JPEG, GIF or WebP bytes. The request may reference the image by URL or file ID, the Base64 may be truncated, or the image may be in another format such as HEIC.
Can it extract images from a response too?
Yes. Any JSON works, including an image generation response with b64_json fields. The tool returns the first string that decodes to a supported image, wherever it sits.
Is the request with my image uploaded anywhere?
No. Parsing, decoding and the preview all happen in your browser, and the pasted JSON is not transmitted. Requests that include private photos or documents stay on your machine.
How do I get the request JSON from my application?
Log the serialized body just before the HTTP call, or copy it from the network panel of your browser's developer tools for client-side calls.