Encodings

z-base-32

Base32 ordered so the common characters are the easy ones to read and say. Lightning and Mnet
IDz-base-3206 / 20base32 · 32 characters
Encoding / Base32

z-base-32

Base32 ordered so you can read it out loud.

Overhead
+60% on random bytes
Padding
none
Standard
Zooko O'Whielacronx, human-oriented base-32 encoding (2002)
Used by
Lightning, Mnet
family 4 / 20

Sample

Out
pb1sa5dxrb5s6huccooo
Back
"hello world!"

Access

Importimport { zbase32 } from "@agntn/encodings/base32"
CLIencodings encode z-base-32 'hello world!'
Tryplayground with the sample above
Kinbase32, base32hex, base32-crockford

Zooko O'Whielacronx reordered the base32 alphabet in 2002. The characters that show up most are the easiest to read, write and say. Lowercase only, no padding. Ever read a key out loud over a call? That's who this is for.

ts
zbase32.encode(new Uint8Array([0xf0, 0xbf, 0xc7]));  // "6n9hq"
encode("z-base-32", "hello");                        // "pb1sa5dx"

6n9hq is the example from the original paper. Zooko wrote it for Mnet. These days you meet it in Lightning, where node message signatures come out as z-base-32.