Image tools

Placeholder generator

A tiny grid-average colour code for image placeholders, on your device. Decode only, not the BlurHash format.

Runs on your device. The file is never uploaded.

Placeholder generator averages your image over a 4 by 3 grid of cells and prints one code line. That code is the grid size, a colon, then each cell colour as six hex digits separated by commas. Columns and rows each accept 1 to 9. Your image is only decoded, so no file comes back, only that line of text.

Input

Options

Questions

Is this a BlurHash?

No, and the tool is explicit about it. BlurHash is a precise format with a defined DCT basis and an 83-character alphabet, and a nearly correct implementation produces a plausible string that no BlurHash decoder can read. Rather than risk that, this outputs its own small, fully described code: a grid of average colours. Do not feed it to a BlurHash library.

What does the code look like?

The grid size, a colon, then the cell colours as six-digit hex separated by commas, in reading order. A 4x3 grid gives something like 4x3:8a7f6d,9b8c74,... with twelve entries. Split on the colon, then on the commas, and you have the colours for the grid. The page prints a one line note saying the same thing next to the code.

How do I use it on a page?

Render the grid as a blurred CSS gradient or a tiny canvas behind the real image while it loads, then swap in the photo. Each cell is the plain average of the pixels inside it, which is why it works as a colour impression and not as a preview of any detail.

What grid sizes can I ask for?

Grid columns and Grid rows each take a whole number from 1 to 9, defaulting to 4 columns and 3 rows. Anything outside that stops with "cols must be a whole number between 1 and 9" or the matching rows message. More cells means a longer code and a slightly closer impression of the picture.

Do I get an image file back?

No, only the text code; this tool decodes your image and never re-encodes one. Nothing is uploaded either: the file is decoded in a Web Worker on your device with the jSquash codecs. JPG, PNG and WebP inputs are read, and anything else stops with "only JPG, PNG and WebP are supported".

Related Image tools