How to use
- Choose Encode to turn text into z-base-32, or Decode to turn z-base-32 back into text.
- Keep the z-base-32 variant selected and make sure Padding is off, since the format does not use it.
- Type or paste your input, or open a file. The result updates as you type.
- Copy the result or download it as a file.
What is z-base-32?
z-base-32 is a Base32 encoding designed by Zooko Wilcox-O'Hearn to be easier for people to read, write and speak. The mechanics are the same as in RFC 4648 Base32: each character carries 5 bits and 5 bytes become 8 characters. The alphabet is what sets it apart:
ybndrfg8ejkmcpqxot1uwisza345h769
It is entirely lowercase and leaves out 0, 2, l and v, which are easy to confuse with o, z, 1 and u. The characters are also reordered, so z-base-32 output looks nothing like standard Base32 of the same bytes and cannot be read by an RFC 4648 decoder.
There is no padding: the length of the data follows from the length of the string. The specification can also encode bit strings that are not whole bytes when both sides agree on the length; this tool always works with whole bytes.
Where z-base-32 is used
- OpenPGP Web Key Directory (WKD). To publish a key at a well-known URL, the local part of the email address is lowercased and hashed with SHA-1, and the 20-byte hash is z-base-32 encoded into a 32-character file name.
- ZRTP. The short authentication string that two callers read aloud to detect a man-in-the-middle attack can be rendered as Base32 with the z-base-32 alphabet (RFC 6189).
- Lightning Network. Node software such as lnd and Core Lightning returns signed messages as z-base-32 strings.
For other human-friendly formats, compare Crockford Base32, which keeps the digits in order and forgives typing mistakes, and Base58, which is shorter but case sensitive.
Specification
| Alphabet | ybndrfg8ejkmcpqxot1uwisza345h769 |
|---|---|
| Output size | 8 characters per 5 bytes (160%) |
| Padding | None |
| Standard | z-base-32 (Zooko Wilcox-O'Hearn) |
| Case sensitive | No |
Examples
| Input (UTF-8) | Output |
|---|---|
Hello, World! | jb1sa5dxfoofq551pt1nn |
Base64.is | ejozg3jsgozg1ha |
你好 | h164b3pfzw |
Frequently asked questions
Is z-base-32 the same as Base32?
No. It uses the same 5-bit grouping as RFC 4648 Base32, but a different, reordered alphabet and no padding. A z-base-32 string must be decoded with a z-base-32 decoder.
Is z-base-32 case sensitive?
The alphabet is lowercase and the output is always lowercase. This decoder also accepts uppercase input and converts it to lowercase before decoding.
What if my string ends with = signs?
z-base-32 does not use padding, but if a string ends with = signs the decoder simply ignores them.
How do I get a WKD hash?
--with-wkd-hash option.