Start a project

Tool 74 of 194 · Images

BlurHash, ThumbHash & LQIP Generator

Pick the right placeholder for your images: see BlurHash, ThumbHash, a dominant colour and a tiny image side by side, with what each costs.

BlurHash, ThumbHash & LQIP Generator

Your image

The sample is Malham limestone pavement by Paul Morris (CC0, via Wikimedia Commons). Your own image never leaves your browser.

Side by side

Original
BlurHash
ThumbHash
Dominant colour
Tiny image, scaled up

Cost of each placeholder

MethodValueBytesNeeds JavaScript

Strings

BlurHash
ThumbHash (Base64)
Tiny image data URI

CSS and HTML

Placeholder CSS
Image markup

01

What it does

Makes four kinds of placeholder from your image with the reference encoders, previews each one decoded from the placeholder itself, and gives its size in bytes.

  • BlurHash with adjustable detail, from the reference encoder
  • ThumbHash, which also keeps transparency and the aspect ratio
  • Dominant colour (and the average) for a zero-cost placeholder
  • Tiny WebP or JPEG data URI, 8 to 32 px wide

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

Four placeholders with previews, byte counts, the strings and ready CSS, with a Copy and a Download button on every result.

  • BlurHash
  • ThumbHash
  • LQIP
  • Placeholders

Why it matters

A placeholder fills an image's space while it loads, so the page doesn't look broken and the layout doesn't jump. The options range from a flat colour to a tiny blurred version of the image. BlurHash and ThumbHash pack a soft impression of the picture into 20 to 30 characters, but need a few lines of JavaScript to draw. A tiny data URI needs no script but costs a few hundred bytes per image in your HTML or CSS.

This generator makes all four from your image, using the reference BlurHash and ThumbHash encoders, so the strings will decode the same in any library. Each preview is drawn from the placeholder itself, which shows what visitors will actually see. The table gives the byte cost of each and whether it needs JavaScript, and the CSS block is ready to use for the colour and data URI options.

How to use it

  1. Drop an image, or use the sample.
  2. Adjust BlurHash detail and the tiny image width.
  3. Compare the previews and the byte counts.
  4. Copy the string or CSS you want.

FAQ

BlurHash or ThumbHash?

ThumbHash keeps more detail and colour for its size, handles transparency and stores the aspect ratio. BlurHash has more libraries and server tools. Both need a small decoder in the browser.

Is a dominant colour enough?

Often, yes. It costs nothing beyond the CSS, needs no script and still stops the flash of an empty box.

How big should a tiny image be?

16 px wide is a good balance: a few hundred bytes and enough shape to read once it's blurred. Go to 8 px to save bytes, or 32 px for more detail.

Is my image uploaded?

No. Everything is computed in your browser.

Credits and licences

Uses BlurHash (MIT, Wolt) and ThumbHash (MIT, Evan Wallace). Sample photo: Malham limestone pavement by Paul Morris, CC0, via Wikimedia Commons.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk