This tool encodes data with the geohash Base32 alphabet — the same 32 symbols that geohashes use to encode locations. The alphabet runs 0–9 then lowercase b–z, deliberately skipping a, i, l and o to avoid easily confused characters. While geohashes pack latitude and longitude into these symbols, the encoding itself works on any bytes, which is what this tool exposes.
How it works
Encoding reads your text as UTF-8 bytes and regroups the bit stream into 5-bit chunks, since each Base32 symbol carries 5 bits. Every chunk indexes into the alphabet 0123456789bcdefghjkmnpqrstuvwxyz. If the final group has fewer than 5 bits, it is zero-padded on the right to form one last symbol; no = padding is added.
Decoding reverses the process: it lowercases the input, ignores whitespace, looks each symbol up in the alphabet, and reassembles the 5-bit values into 8-bit bytes. Those bytes are then read back as UTF-8. A symbol outside the alphabet — such as a, i, l or o — produces a clear error.
Example
Encoding Hi gives 91nh. The two bytes 48 69 become a 16-bit value that splits into the 5-bit groups 01001 00001 101001 (padded), mapping to the symbols 9, 1, n, h.
The geohash alphabet vs. other Base32 variants
There are several Base32 variants in common use, and they are not interchangeable:
| Variant | Alphabet | Case | Pads with = ? |
|---|---|---|---|
| RFC 4648 Base32 | A–Z, 2–7 | Uppercase | Yes (optional) |
| Crockford Base32 | 0–9, A–Z minus I, L, O, U | Uppercase | No |
| Geohash Base32 | 0–9, b–z minus a, i, l, o | Lowercase | No |
| Base32Hex | 0–9, A–V | Uppercase | Yes (optional) |
The geohash alphabet and RFC 4648 are not interchangeable. Q in RFC 4648 represents a different 5-bit value than q in the geohash alphabet. If you paste geohash-encoded data into a standard Base32 decoder, it will either reject the lowercase characters or produce wrong bytes. Always confirm which variant a system expects before mixing tools.
Why geohashes use this specific alphabet
The geohash geocoding system, published by Gustavo Niemeyer in 2008, uses the lowercase alphanumeric set specifically to make geographic hashes short, URL-friendly, and visually clear. A geohash like gcpvj0e is a 7-character identifier that narrows a location to roughly 150 metres in each direction. The characters were chosen to sort in a useful spatial order when used as a prefix tree — longer geohash strings zoom in while shorter ones zoom out, and adjacent strings in the character sequence represent geographically adjacent cells.
This tool encodes arbitrary bytes using those same symbols, not actual geographic coordinates. If you need to convert a geohash into latitude and longitude, you need a dedicated geohash decoder, not this encoder.
Practical use beyond geolocation
The geohash alphabet is occasionally chosen for non-location short IDs in systems that already standardise on it. Its URL-safe, lowercase, ambiguity-reduced character set makes it a readable choice for reference codes and document identifiers where collisions with confusable characters matter. Everything runs locally in your browser; your data is never uploaded.