skillfed

blurhash

Pure-Python implementation of the blurhash algorithm.

blurhash v1.1.5 225.6K downloads/30d#9,219 on PyPI97
Permissive license MIT AGING released

What it is and what it does

Blurhash is a pure-Python implementation of the blurhash algorithm that converts images into short text strings representing blurred versions of those images. The library exports encode and decode functions to transform between image arrays and blurhash strings, plus helper functions for color space conversion between sRGB and linear color. It has no runtime dependencies, making it lightweight to add to any project.

The typical use case is generating placeholder images during page load: you encode an image once and store the small hash string alongside your image metadata, then decode it to quickly display a blurred preview while the full image loads or before showing it behind a content warning. The decode function accepts a punch parameter to adjust contrast and can decode to any specified width and height.

Use it for:

  • Generate blurred placeholder images for web pages while full-resolution images are loading.
  • Store compact image previews in metadata or databases without storing full image files.
  • Create content-warning blur overlays by decoding blurhash strings to small placeholder images.
  • Embed blurhash strings in JSON responses to provide instant visual feedback before image delivery.
  • Resize and blur images efficiently by encoding once and decoding to different dimensions.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Encodes images into compact blurhash text strings and decodes them back into blurred placeholder images.

Yes. The package is stable (Production/Stable status), has zero known vulnerabilities, installs with no dependencies, and solves a specific problem well for image-heavy applications. The aging maintenance status is not a blocker—the library is mature and the repository remains active. Install it if you need image placeholders or compact image representations.

Install

blurhash on PyPI

pip

pip install blurhash

uv

uv add blurhash

poetry

poetry add blurhash

Installing blurhash

Before you install

Installs with no runtime dependencies and low friction. Last release was 362 days ago; the repository is active and not archived, though maintenance status is aging.

License in practice

MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install blurhash

import blurhash

# Encode and decode blurhash strings
hash_string = blurhash.encode(image_array)
img_array = blurhash.decode(hash_string, 128, 128)

Requires a 3-dimensional array with y, x, and RGB components; encoding and decoding require external libraries like PIL and numpy to prepare image data.

Verify before relying

  • Whether the aging maintenance status indicates future support concerns or is simply a stable, mature library.
  • Performance characteristics when encoding or decoding very large images or many images in sequence.
  • Python version compatibility beyond the classifiers indicating support for Python 2 and 3.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 362 days since the last release
Last repo commit
First released
Downloads 225,565/month — #9,219 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: blurhash-1.1.5-py2.py3-none-any.whl

Keywords: blurhash, graphics, web_development

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Multimedia :: Graphics

Tags

image placeholder generationblurhash encode decodeblurred image previewimage to text hashloading image placeholdercompact image representation
image-processingweb-performance

More Graphics packages