go-blurhash

github.com/buckket/go-blurhash Fediverse Open-source projectOpen source

Encode and decode Blurhash values with this implementation written in Go.

github.com/buckket/go-blurhash
go-blurhash homepage screenshot

About go-blurhash

go-blurhash is a pure Go library for BlurHash, a compact representation of an image placeholder used by Mastodon and other Fediverse software for preloading placeholders and hiding sensitive media. It generates a BlurHash string from an image, reconstructs a blurred image with specified dimensions from a hash, and can report the component counts stored in a hash.

The project notes it is presumably slower than the C reference implementation, uses additional memory to speed encoding, and recommends generating small images around 32x32px and scaling them up afterwards.

Key features

  • Encode an image into a BlurHash string
  • Decode a BlurHash string into a blurred image
  • Specify width, height, and punch value when decoding
  • Set x and y component counts when encoding
  • Read x and y component counts from a hash
  • Pure Go implementation for encoding and decoding
Best for: Go developers who need to generate or render BlurHash placeholders, including for Fediverse software.
Good for
  • Pure Go implementation covering both encoding and decoding
  • Provides encode, decode, and component-inspection functions
  • Open source under GPL-3.0 license
Watch out for
  • Presumably slower than the C implementation, with benchmarks pending
  • Encoding increases memory usage to increase encoding speed
  • Recommends generating small images and scaling up for performance

go-blurhash at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

go-blurhash alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Fediverse

Well-known listings from the same topic.

All 113

go-blurhash FAQ

How do I install go-blurhash?
From source with: go get -u github.com/buckket/go-blurhash
What functions does the library provide?
Encode for creating a hash, Decode for creating an image with chosen width, height and punch, and Components for reading x and y components from a hash.
How should decoded images be sized for performance?
Generate a very small image, around 32x32px, via BlurHash and scale it up to the desired dimensions afterwards.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing