About Image to JSON
Some image generators and automation workflows work better when they receive an image's properties as structured data instead of loose prose. Pick a picture and this tool returns neatly formatted JSON in two parts. The file section holds the name, MIME type, size in bytes, width, height, aspect ratio and orientation. The visual section holds a palette of up to five dominant colors with each one's share of the image, the average RGB color, brightness, contrast and saturation as rough 0–100 values, a tonal key and a color temperature.
Be clear about what it doesn't do: there is no AI vision here. It cannot tell a person from a car or describe what is happening in the scene. Every value is measured straight from the pixels inside your browser. The description of the content comes from you, through an optional text field that is copied verbatim into the JSON. That makes it useful for prompt writers who want an accurate color and lighting baseline, and for developers who need image properties for code, a CMS or a database.
Why use it
- Collects dimensions, file size, aspect ratio and orientation in one copy-ready block.
- Extracts a real palette with HEX codes and the share each color takes up.
- Measures brightness, contrast, saturation and warmth, which is useful for describing lighting in prompts.
- Reads the image on your device only; nothing is uploaded to a server or an AI service.
- Outputs valid, pretty-printed JSON you can paste straight into code or an automation tool.
How to use
Choose an image
Click the Image field and pick a file. Anything your browser can open works, such as JPG, PNG or WebP.
Add an optional description
Describe what is in the picture or what you want to create, for example "a ceramic coffee cup on an oak table, morning light". It goes into the description field unchanged.
Click Generate
The image is analysed in a moment and the JSON appears in the result box.
Copy or save
Use Copy to put the JSON on your clipboard, or Save to keep it in the local prompt library in your browser.
Examples
A baseline for a JSON prompt
You want new product shots that match an existing warm-toned photo. Take the five HEX codes, the tonal key and the temperature from the output, add your product description, and the generator gets a precise color brief.
Auditing site images
A developer needs each banner's width, height and ratio before placing it in a template. Run each image and copy the file block.
Pulling colors for a design
A sunset photo has the palette you want for a social post. Copy the HEX values from color_palette into your design tool.
Comparing two exposures
Two shots of the same product, one looks darker. Compare brightness_pct and contrast_pct to put numbers on the difference.
| Field | Meaning |
|---|---|
| width / height | Original pixel dimensions |
| aspect_ratio / orientation | Width divided by height; landscape, portrait or square |
| color_palette | Up to five dominant colors as HEX with their share |
| average_rgb | Average color of the whole image |
| brightness_pct / contrast_pct / saturation_pct | Approximate 0–100 estimates |
| tonal_key | Low-key (dark), balanced mid-tones or high-key (bright) |
| color_temperature | Warm, cool or neutral |
| description | Your own text, or empty |
Tips
- Describe the scene precisely in the description field; the tool only knows what the picture shows from what you tell it.
- The palette is computed from a downscaled copy, so it reflects dominant areas rather than tiny details.
- Transparent pixels in PNGs are skipped, so the palette describes only the visible part of the image.
- Prefer a ready-made text prompt over JSON? The Image to Prompt tool uses the same measurements.
- The privacy field is just a processing note; delete it before pasting the JSON into a prompt if you don't need it.
The image is read and analysed inside your browser and is never uploaded to a server or AI service.
Frequently asked questions
Does it recognise what's in the image?
No. There is no AI vision involved, so it can't identify people, objects or scenes. It measures colors and dimensions only; any description of content comes from the text you type.
How is the color palette chosen?
The image is downscaled internally, similar pixels are grouped into color buckets, and the most frequent buckets are kept as long as they are clearly different from each other. Images with very similar tones may return fewer than five colors.
What does share mean next to each color?
It is the approximate fraction of the image's pixels that fall into that color group. The shares may not add up to 100% because minor colors don't make the palette.
How are brightness, contrast and saturation measured?
Brightness is the average luminance scaled to 0–100, contrast is based on how much luminance varies across pixels, and saturation is the average color intensity. They are practical estimates for comparison, not calibrated measurements.
Is my image uploaded?
No. It is processed entirely on your device in the browser and never sent to a server.
Does it read EXIF data like camera model or GPS?
No. The output includes file name, type, size, dimensions and the visual measurements only, with no EXIF fields.
Which formats are supported?
Any format your browser can decode, such as JPG, PNG, WebP and GIF. iPhone HEIC photos usually work only in Safari; convert them to JPG elsewhere.
Can I use the output as an image-generation prompt?
Yes, as a starting point. Some generators accept JSON-style prompts: put the scene in description and keep the measured palette and lighting. Check that your generator handles structured prompts well.
What does tonal_key mean?
It summarises overall lighting: low-key for dark, moody images, high-key for bright, airy ones, and balanced mid-tones in between. It is derived from average brightness.
How is color temperature decided?
By comparing the average red and blue values. A clear lead for red gives warm, a clear lead for blue gives cool, and anything in between is neutral.
Can I analyse several images at once?
No, one image per run. Choose the next file and click Generate again.
Where does Save store the result?
In a local library inside your browser on this device. It is not synced anywhere and disappears if you clear your browser data.
Last updated: