Skip to content

↑↓ navigate ↵ open Esc close Search runs locally

Encoding tools: Base64, Base32, Base58, Hex and more

Every encoding here turns bytes into printable text and back. They differ in alphabet, size and where they are safe to use. Compare them side by side, then open the one you need: each tool encodes and decodes in your browser.

  • Runs in your browser
  • 9 encodings
  • Encode and decode on every page

All encoding tools

Encodings compared

The size column is how much longer the output is than the input. The last example column shows the same five bytes, the word Hello, in each encoding.

EncodingAlphabetSymbolsSizeCase-sensitivePadding"Hello"Best for
Hex (Base16) 0–9 a–f 16 +100% No None 48656c6c6f Hashes, debugging, byte dumps
Base32 A–Z 2–7 32 +60% No = to 8 JBSWY3DP 2FA secrets, case-insensitive systems
Base36 0–9 a–z 36 ≈ +55% No None 3yud78mn Numeric IDs people type
Base58 No 0 O I l 58 ≈ +37% Yes None 9Ajdvzr Crypto addresses and keys
Base62 0–9 A–Z a–z 62 ≈ +34% Yes None 5TP3P3v Short URLs and compact IDs
Base64 A–Z a–z 0–9 + / 64 +33% Yes = to 4 SGVsbG8= APIs, email, data URLs
Base64URL A–Z a–z 0–9 - _ 64 +33% Yes Usually none SGVsbG8 JWTs, URLs, file names
Base85 (Ascii85) ! to u 85 +25% Yes None 87cURDZ PDF, PostScript, ZeroMQ

Which encoding should I use?

  • Binary data in JSON, an API or emailBase64
  • Tokens in a URL, a JWT or a file nameBase64URL
  • Secrets people type, or case-insensitive systemsBase32
  • Short IDs from database numbersBase62
  • Short IDs that must ignore letter caseBase36
  • Crypto addresses, keys and IPFS hashesBase58
  • Reading hashes and debugging bytesHex
  • The smallest text, in PDFs or ZeroMQBase85

How these encodings work

All of them solve the same problem: many systems only handle printable text, but data is made of bytes with values from 0 to 255. An encoding maps those bytes onto a small set of safe characters, and decoding maps them back exactly.

There are two families. Bit-group encodings (Hex, Base32, Base64, Base64URL and Base85) cut the input into fixed groups of bits: 4 bits per hex character, 5 per Base32 character, 6 per Base64 character. They are fast and work on files of any size. Big-number encodings (Base36, Base58 and Base62) read the whole input as one large number and convert it to another base, like writing a decimal number in binary. They produce compact, symbol-free strings but get slow on large data, so they are used for IDs, keys and addresses.

None of them is encryption. Encoded data can be decoded by anyone, so never use an encoding to hide a secret. Looking for Caesar, Vigenère or ROT13? See our cipher tools.

Frequently asked questions

What is the difference between Base32, Base58 and Base64?

They use different alphabets and sizes. Base64 is the most compact standard (33% overhead) but is case-sensitive and uses + and /. Base32 uses only uppercase letters and the digits 2–7 (60% overhead), so it survives case changes and is easy to type. Base58 removes lookalike characters such as 0 and O, and is used for crypto addresses.

Which encoding produces the shortest output?

Base85 (25% overhead), then Base64 and Base64URL (33%), Base62 (about 34%) and Base58 (about 37%). Hex is the longest at 100%.

Is any of these encodings secure?

No. Encoding only changes how data is written and anyone can reverse it. To protect data, encrypt it first and then encode the encrypted bytes if they need to travel as text.

Which encoding should I use in a URL?

Base64URL for binary data and tokens, or Base62 and Base36 for short IDs. Standard Base64 is not URL-safe because of +, / and =.

Why does Hello look so different in each encoding?

Each encoding splits the same five bytes differently: hex uses 4 bits per character, Base32 uses 5, Base64 uses 6, and Base58, Base62 and Base36 convert the whole input as one large number.

Your next tool is one search away.

Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.

Browse all tools

Tip: press Ctrl D to bookmark dev247.