Skip to main content
ponderloop

Base32, Base58 and Base85 Encoder / Decoder

Type or paste text (or hex bytes) to encode it as Base32, Base32hex, Crockford Base32, Base58, Base58Check, Ascii85 or Z85, or switch to Decode to turn it back. The example “foobar” is 6 bytes in UTF-8 and becomes MZXW6YTBOI====== in Base32 (the RFC 4648 §10 test vector), CPNMUOJ1E8====== in Base32hex, CSQPYRK1E8 in Crockford Base32 (check symbol 6), t1Zv2yaZ in Base58 and AoDTs@<) in Ascii85. Decoding ignores spaces and line breaks and points at the first wrong character by position. Base58Check adds a double SHA-256 checksum, computed in your browser with Web Crypto. Nothing you enter is uploaded.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Direction
Bytes are written as
Stays in your browser

Your text is converted on this device and never uploaded. It is not saved either: reload the page and it is gone.

Format options

Result

Encoded 6 bytes of UTF-8 text as Base32.

Input
6 bytes
Base32
16 characters
Size change
+167%

RFC 4648 §10 test vectors

The standard Base32 and Base32hex vectors, produced by this tool. “=” pads the last group to 8 characters; many systems leave it out.
TextBase32Base32hexBase32 without padding
(empty)(empty)(empty)(empty)
fMY======CO======MY
foMZXQ====CPNG====MZXQ
fooMZXW6===CPNMU===MZXW6
foobMZXW6YQ=CPNMUOG=MZXW6YQ
foobaMZXW6YTBCPNMUOJ1MZXW6YTB
foobarMZXW6YTBOI======CPNMUOJ1E8======MZXW6YTBOI

Alphabets and where each format is used

Base32 and Base58 write bytes as numbers in a smaller, safer alphabet. Ascii85 and Z85 pack every 4 bytes into 5 characters.
FormatCharactersLeft out or specialTypical use
Base32 (RFC 4648 §6)A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 2 3 4 5 6 7“=” padding; no 0, 1, 8, 9One-time-password secrets, onion addresses
Base32hex (RFC 4648 §7)0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V“=” padding; sorts like the bytesDNSSEC NSEC3 hashes
Crockford Base320 1 2 3 4 5 6 7 8 9 A B C D E F G H J K M N P Q R S T V W X Y ZNo I, L, O, U; check symbols * ~ $ = UHuman-typed identifiers and codes
Base58 (Bitcoin)1 2 3 4 5 6 7 8 9 A B C D E F G H J K L M N P Q R S T U V W X Y Z a b c d e f g h i j k m n o p q r s t u v w x y zNo 0, O, I, l; leading zero bytes become “1”Bitcoin addresses, IPFS CIDv0
Ascii85 (Adobe)! to u (ASCII 33 to 117)“z” for four zero bytes; optional <~ and ~>PostScript and PDF streams
Z85 (ZeroMQ RFC 32)0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z . - : + = ^ ! / * ? & < > ( ) [ ] { } @ % $ #Input must be a multiple of 4 bytes; safe in source codeZeroMQ CURVE keys

Base58 and Base58Check examples

Hex bytes and their Base58. Each leading 00 byte becomes a leading “1”. The Bitcoin genesis address is version 00 plus the hash 62e907b15cbf27d5425399ebf6f0fb50ebb88f18, and Base58Check turns it into 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.
Bytes (hex)Base58
612g
626262a3gV
73696d706c792061206c6f6e6720737472696e672cFupjhnEsSn59qHXstmK2ffpLv2
572e47943EFU7m
00eb15231dfceb60925886b67d065299925915aeb172c066471NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L
000000000011111
0062e907b15cbf27d5425399ebf6f0fb50ebb88f1812NvYg7CXwVYtMDYia7n9viekJ6d5
0062e907b15cbf27d5425399ebf6f0fb50ebb88f18 + checksum (Base58Check)1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

Crockford Base32 decoding aliases

Crockford Base32 is case-insensitive and forgiving, so a code read aloud or copied by hand still decodes. Hyphens and spaces are ignored.
You typeRead asWhy
O or o0Looks like zero
I, i, L or l1Look like one
Unot a data digitLeft out to avoid accidental obscenities; valid only as the check symbol
- (hyphen)ignoredMay be inserted for readability

How much bigger each format gets

The same 100 bytes (none of them zero) written in each format, with Base32 padding on. Base58Check adds a version byte and a 4-byte checksum.
FormatCharacters for 100 bytesIncrease
Base32160+60%
Crockford Base32160+60%
Base58136+36%
Base58Check (version 00)143+43%
Ascii85125+25%
Z85125+25%

How to encode or decode Base32, Base58 or Base85

  1. Choose a format. Pick Base32, Base32hex, Crockford Base32, Base58, Base58Check, Ascii85 or Z85. Only the options that apply to that format are shown.
  2. Choose a direction. Pick “Encode” to convert text or hex bytes, or “Decode” to turn encoded text back into bytes.
  3. Say how bytes are written. Choose “Text (UTF-8)” for ordinary text, or “Hex bytes” to work with raw bytes such as 66 6f 6f. This applies to the input when encoding and to the result when decoding.
  4. Paste your input. The result appears as you type. A wrong character is reported with its position in what you typed.
  5. Copy the result. Copy the output, or use “Use result as input” to flip direction and check the round trip.

Frequently asked questions

What is the difference between Base32, Base58 and Base85?
They differ in how many characters carry the data. Base32 uses 32 (5 bits each, 60% larger), Base58 uses 58 and is built for strings people copy and type (about 37% larger), and Base85 uses 85 (4 bytes become 5 characters, 25% larger). Smaller alphabets are safer to read aloud and type; larger ones are more compact.
What is Base32hex?
Base32hex is the second Base32 alphabet in RFC 4648 §7. It uses 0–9 and A–V in that order, so encoded strings sort in the same order as the bytes they encode. DNSSEC uses it for NSEC3 hashed names.
How does Crockford Base32 differ from standard Base32?
Crockford Base32 uses 0–9 and A–Z without I, L, O and U, has no padding, ignores hyphens and reads O as 0 and I or L as 1, so it survives being typed by hand. It can also end with one of 37 check symbols that catches a mistyped or swapped character. The rules are on crockford.com/base32.
How is the Crockford check symbol calculated here?
Crockford defines the check symbol for a number: the number modulo 37, written with the symbols 0–9, A–Z (without I, L, O and U), * ~ $ = and U. For bytes, this tool reads the bytes as one big-endian number and applies that rule, so the number 1234 (04 d2) gets the symbol D. Other tools may check the 5-bit digit string instead and give a different symbol.
Why does Base58 have no 0, O, I or l?
Those four characters look alike in many fonts (0 and O, I and l), so Bitcoin’s Base58 leaves them out, and it also leaves out “+” and “/” so addresses select in one double-click. Base58 treats the bytes as one large number, so each leading zero byte is written as a leading “1”, which this tool keeps when decoding.
What is Base58Check and how is the checksum calculated?
Base58Check puts a version byte in front of the data, appends the first 4 bytes of SHA-256(SHA-256(version + data)) and encodes all of it in Base58. A mistyped address then fails the check with a very high probability. The hashing uses your browser’s Web Crypto API, which is why this format answers a moment after you type.
What are Ascii85 and Z85?
Both turn each 4 bytes into 5 characters. Ascii85 is the Adobe form used in PostScript and PDF: characters ! to u, “z” for four zero bytes and optional <~ and ~> markers. Z85 is the ZeroMQ RFC 32 form: a different 85-character alphabet that avoids quotes and backslashes, so it can sit inside source code, and the data must be a multiple of 4 bytes.
What does “invalid character at position” mean?
Each format accepts only its own characters. The position counts every character you typed, including spaces and line breaks, starting at 1, so you can find it in your text. For Base58 the message also names look-alikes such as 0, O, I and l.
Is my text saved or sent anywhere?
No. Encoding, decoding and the Base58Check hashes run in your browser, nothing is uploaded and nothing is saved: reload the page and it is gone. The only thing the site records, if you allow analytics, is that a button was used, never any of your text.

How it works

Text is converted to UTF-8 bytes with TextEncoder (or hex digits are read directly), and the same code path runs for the example on this page. Base32, Base32hex and Crockford Base32 take the bytes 5 bits at a time and look each value up in the alphabet; a last group is filled with zero bits, and RFC 4648 padding adds “=” up to a multiple of 8 characters. Decoders accept lower case, ignore spaces and line breaks, and reject lengths that no byte string can produce. Base58 treats the bytes as one big number and writes it in base 58, with a “1” for every leading zero byte; because that is quadratic, input over 8,000 characters is refused. Base58Check prepends the version byte(s) and appends the first 4 bytes of a double SHA-256 computed with SubtleCrypto.digest. Ascii85 and Z85 read 4 bytes as a big-endian number and write it as five base-85 digits; a short final Ascii85 group of n bytes becomes n + 1 characters, and a group above 2^32 − 1 is reported as an error. Results are checked against the RFC 4648 §10 vectors, the Bitcoin genesis address (1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa) and the RFC 32 vector (864fd26fb559f75b is HelloWorld). Bytes in hex are shown like this: 66 6f 6f 62 61 72.

Sources

More: Encoding and number systemsAll developer toolsAll toolsHome & DIY calculators