Upload a file
  1. base64hub
  2. Other bases

Base32, Base58, Base85 and Other Bases

Paste a string in any of more than 30 formats and the converter guesses which one it is, then re-encodes the bytes into the format you pick. Below the tool: how the encodings compare and when to use each.

Free no sign-up, no limits Local nothing uploaded Updated Oct 27, 2026
HEXHex to Base64Hex dump in, Base64 out HEXBase64 to hexInspect the raw bytes 01Base64 to binarySee every bit 01Binary to Base640s and 1s to Base64 [ ]Base64 to byte arrayFor C, Java, Python, Go, C#, JS [ ]Byte array to Base64Paste bytes from any language 123Base64 to decimalBytes as decimal numbers 123Decimal to Base64Byte values to Base64 32Base32RFC 4648, hex, Crockford, z-base-32 32Base32 decoderBase32 back to text or bytes 58Base58Bitcoin, Flickr and Ripple alphabets 58Base58 decoderBase58 to hex, text or Base64 58Base58CheckWith version byte and checksum 58Base64 to Base58Re-encode keys and hashes 58Base58 to Base64Solana and IPFS keys to Base64 32Base64 to Base32Convert secrets for TOTP apps 32Base32 to Base64Base32 secrets to Base64 62Base62Short IDs and URLs 36Base36Digits and lowercase letters 85Base85 / Ascii85Adobe, Z85, RFC 1924, git Z85Z85ZeroMQ Base85 91Base91Densest printable encoding 45Base45RFC 9285, QR-friendly 16Base16 (hex)RFC 4648 Base16 UUUuencodeClassic Unix binary-to-text XXXxencodeUuencode with a safer alphabet HEXHex to textHex bytes to readable text HEXText to hexAny text as hex bytes 01Binary to text0s and 1s to readable text 01Text to binaryAny text as 8-bit binary
Input 0Bytes 0 BOutput 0

Processed in your browser. This page cannot send your data anywhere – how we know

How to convert between any two encodings

  1. Paste your string into the input. With From on Auto-detect, the status line says what the tool thinks it is: “Detected: Base58 · Not right? Read as [Base64] …”.
  2. If the guess is wrong, click one of the Read as buttons, or set From yourself.
  3. Choose the target in To. The formats are grouped: text, Base64, bytes and numbers, Base32, big-number bases, Base85/Base91/Base45, and email, URL and legacy encodings.
  4. Each format’s options appear under its pane, for example Alphabet for Base58 and Base62 or Padding (=) for Base32 and Base64.
  5. ⇄ Swap moves the output into the input and reverses the two formats. Copy output and Download take the result, and Save bytes downloads the decoded bytes as a file.

Every conversion goes through raw bytes: the input is decoded, and the bytes are encoded again. The Bytes counter under the tool shows how many there are, which is often the quickest check that a key or hash is complete. The single-purpose pages listed above open this same converter with the formats preset.

The encodings compared

EncodingAlphabetOutput sizeOverheadTypical use
Hex / Base16162 characters per byte100%Hashes, debugging, byte dumps
Base32328 per 5 bytes60%TOTP secrets, onion addresses, case-insensitive IDs
Base3636≈ 1.55 per byte≈ 55%Short case-insensitive IDs and numbers
Base45453 per 2 bytes50%QR codes (EU health certificates)
Base5858≈ 1.37 per byte≈ 37%Bitcoin, Solana, IPFS
Base6262≈ 1.34 per byte≈ 34%Short URLs and IDs
Base64644 per 3 bytes33%Email, JSON, data URIs, JWTs, almost everything
Ascii85 / Z85855 per 4 bytes25%PDF, PostScript, Git, ZeroMQ keys
basE9191≈ 1.23 per byte14–23%Squeezing data into printable ASCII
Uuencode / xxencode644 per 3 bytes plus line framing≈ 38%Old email and Usenet attachments

The overhead is for random data; for the big-number bases it varies by a character or two with the value. Base45 looks wasteful here, but in a QR code’s alphanumeric mode its 45 characters cost 5.5 bits each, which brings it close to 3%.

For a single input, here is the 5-byte string Hello in each:

HexBase32Base36Base45Base58Base62Base64Ascii85basE91
48656c6c6fJBSWY3DP3yud78mn%69 VDL29Ajdvzr5TP3P3vSGVsbG8=87cURDZ>OwJh>A

Three ways to build a base

The encodings fall into three groups, and the group explains most of their behavior.

Bit groups: hex, Base32, Base64, uuencode and xxencode. The alphabet size is a power of two, so each character carries a fixed number of bits (4, 5 or 6). Encoding is fast, works as a stream, and the output length depends only on the input length.

Fixed blocks: Base45 (2 bytes into 3 characters) and the Base85 family (4 bytes into 5). The alphabet is not a power of two, so a small block is converted as a number. Still fast and streamable, with the length again fixed by the input size.

Big numbers: Base36, Base58 and Base62. The entire input is one number, written in the new base. Any alphabet size works and the output has no padding, but every byte affects every character, leading zero bytes need special handling, and the cost grows with the square of the size. This converter keeps leading zeros as leading zero digits and caps these bases at 64 KB of input.

basE91 sits between the groups: it reads 13 or 14 bits at a time, so its length depends slightly on the content.

Which encoding to choose

  • Programs talk to programs: Base64, or Base64URL inside URLs and tokens. Every language has it built in, and nothing else is as widely understood.
  • People read, type or dictate the value: Base32, preferably Crockford’s variant, or Base36. Both ignore case; Crockford also avoids look-alike letters.
  • Short opaque IDs in URLs: Base62 for the shortest letters-and-digits string, Base58 if people may copy it by hand, since it drops 0, O, I and l.
  • A QR code: Base45 with the QR alphanumeric mode.
  • Every byte counts and the channel is plain ASCII: Ascii85 or Z85 for fixed blocks, basE91 for a few percent more.
  • Inspecting bytes: hex. Twice the size, but every byte is two characters you can read.
  • A legacy system asks for it: uuencode or xxencode, and nothing new.

The comparison of hex, Base32, Base58 and Base85 goes deeper into the trade-offs against Base64.

FAQ

What is the most compact text encoding for binary data?

Among the common ones, basE91 (about 23% overhead on random data), then the Base85 family (25%), then Base64 (33%). The more compact encodings use punctuation that needs escaping in JSON, HTML or shells, which often makes Base64 the better trade.

Which encoding is best for URLs?

Base64URL for machine-generated tokens, since it is short and standardized. Base62 or Base58 when the value should contain only letters and digits, and Base32 or Base36 when it must survive case changes. Base45 and Base85 contain characters that need percent-encoding.

Why do Base58, Base62 and Base36 outputs vary in length?

They treat the input as one big number, so the length depends on its value as well as on the byte count. Base64, Base32 and hex map fixed bit groups and always give the same length for the same number of bytes.

How does auto-detect decide what my string is?

It tests the input against each format’s rules, from the most distinctive (delimiters like <~ or begin 644) to the most generic, and decodes with the first match. A short string can be valid in several formats; the Read as buttons let you pick another reading.

Do these encodings protect the data?

No. Anyone can reverse every one of them without a key. They only make bytes printable. See encoding vs encryption.