PNG to JSON
Puts an image into JSON, as base64, a dot matrix or file details.
Drop a PNG here or click to choose
JSON
Open a PNG file or drag it into the box, then choose what goes into the JSON.
Image as base64
The whole file is written as letters into the data field, along with the name, dimensions, and size. This is how an image goes into a config, a test, or an API response. The bytes stay the same: it is the same PNG in a different notation, and it weighs about a third more than the original.
Pixel matrix
Each row of the image becomes a row of the array, and each pixel becomes a color. A color is written as four RGBA numbers, three RGB numbers, a string like #ff0080, or a single integer. This works for editing pixel art, icons, and LED matrices. A large photo has millions of pixels, so the JSON would be unmanageable — use base64 for that.
File details
Dimensions, color depth, color type, palette, pixel density, modification time, and the list of chunks the file consists of, each marked with whether its checksum matched. Text labels land here too: editors write them, and they can hold an author name or a program name.
Rate this tool
Help us get better
Tell us what was missing.
Other tools
Favicon Generator
A full set of site icons from an image, letter or emoji.
CSS Sprite Generator
Glues icons into one file with ready-made CSS.
Add Text to Image
A caption or watermark on photos, with batch processing.
Photo Watermark
A semi-transparent caption or tile across the whole image.
Photo Editor
An image editor in the browser, nothing to install
Image Color Palette
A palette from a picture, with color shares and a contrast check
Resize Image
Image size by width, height or percent, saved as JPEG, PNG or WebP
Crop Image
Frame by mouse or exact pixels, everything happens locally