Image Placeholder Generator
Generate a BlurHash, a ThumbHash and a tiny base64 LQIP image for an image, plus ready-to-use CSS, to show a blurred preview while the real image loads. The placeholders are a few dozen bytes and can be stored next to the image URL.
Frequently asked questions
What is a BlurHash?
A compact string, usually 20 to 30 characters, that encodes a blurred version of an image with a few colour components. Apps decode it on the device to show a smooth preview while the image loads.
What is a ThumbHash?
A newer format by Evan Wallace that stores a little more detail, the aspect ratio and transparency in about 25 bytes, shown here as base64.
What is an LQIP?
A low-quality image placeholder: a tiny version of the image, here 16 pixels on the long side as WebP, embedded as a data URI. Browsers can show it without any JavaScript, blurred with CSS.
What do the components settings do?
They set how many horizontal and vertical colour components the BlurHash uses, from 1 to 9. More components keep more detail but make the string longer; 4 by 3 is the common default.
How do I decode BlurHash or ThumbHash?
With the official libraries for JavaScript, Swift, Kotlin and other languages, which turn the string back into a small image on the client.
Is the CSS snippet enough?
For the LQIP, yes: it sets the aspect ratio and the blurred background. Place the real image on top and fade it in when it has loaded.