Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Base Encoder & Decoder

Encode and decode Base16, Base32, Base36, Base45, Base58, Base62, Base64 and Base85. Pick the alphabet variant you need, from Crockford Base32 to Bitcoin Base58 and Ascii85, and convert in either direction.

Everything runs locally in your browser. Your data never leaves your device.

Base
Alphabet

The standard alphabet. This is what a TOTP secret, a DNSSEC NSEC3 hash or an S3 checksum is written in.

Options
Read the input as

Text is encoded as UTF-8 bytes.

0 characters
0 characters

The Base32 alphabet

5 bits per character

A0B1C2D3E4F5G6H7I8J9K10L11M12N13O14P15Q16R17S18T19U20V21W22X23Y24Z25226327428529630731

Five bits per character, so eight characters carry five bytes. Case does not matter, which makes it the encoding of choice for anything a person has to type or read out: TOTP secrets, DNS records and onion addresses.

Reads the input as
Fixed groups of bytes
Bits per character
5
Padding
On, with =
Case
Either case decodes

How the bases compare

Pick a row to switch the converter to that base.

BaseReads input asEncoded sizeAlphabetsWhere you meet it
Groups of bytes200%HexadecimalHex dumps, colors, checksums
Groups of bytes160%RFC 4648, base32hex, CrockfordTOTP secrets, DNS records, onion addresses
One big number155%StandardShort ids and reference numbers
Groups of bytes150%RFC 9285QR codes and digital certificates
One big number137%Bitcoin, Ripple, FlickrBitcoin addresses, IPFS hashes, Solana keys
One big number134%0-9 A-Z a-z, 0-9 a-z A-ZShort links and URL slugs
Groups of bytes133%Standard, URL safeEmail attachments, data URLs, JWTs
Groups of bytes125%Ascii85, Z85PDF and PostScript, ZeroMQ keys

Picking a base

Groups of bytes, or one big number

Base16, Base32, Base45, Base64 and Base85 chop the input into fixed groups, so every byte lands in the same place no matter how long the payload is. Base36, Base58 and Base62 read the whole payload as a single number, which is why they cost more work on long inputs and why a zero byte at the front needs its own rule.

Leading zero bytes

A number does not remember how many zeros sat in front of it, so the big-number bases write one leading alphabet character per leading zero byte. That is where the 1 at the start of a Bitcoin address comes from, and this tool round-trips those bytes for every big-number base.

Typing it out loud

Base32 and Base58 exist because people copy these strings by hand. Base32 ignores case, Crockford drops the characters that look alike and reads I and L as 1, and Base58 leaves out 0, O, I and l for the same reason.

Getting it wrong safely

Base58Check adds four checksum bytes, so a single wrong character in an address is caught instead of sending funds nowhere. Turn it on above and this tool appends the checksum when encoding and verifies it when decoding.

Next steps

Send this tool's output straight into another tool.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Inspect any file or text as a hex dump with offsets, byte values and an ASCII column. Jump to an offset, search for bytes or text, select a range to see it decoded as integers and strings, and copy or download the dump.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

About the Base Encoder & Decoder Tool

This tool converts data between the binary-to-text bases that everything else skips. Pick Base16, Base32, Base36, Base45, Base58, Base62, Base64 or Base85, choose the alphabet variant your data was written in, and read the result as you type in either direction.

Each base only shows the options that apply to it: padding for Base32 and Base64, upper or lower case for Base16 and Base36, the <~ ~> markers for Ascii85, the Bitcoin, Ripple or Flickr alphabet for Base58, and Base58Check when the payload carries a checksum. For Base64 on its own, the Base64 Encoder & Decoder covers that alphabet in more depth.

What you can do

  • Encode and decode Base58 in the Bitcoin, Ripple or Flickr alphabet.
  • Build a Base58Check string and verify the checksum of one you were given.
  • Decode a Base32 TOTP secret, with or without the = padding.
  • Convert to and from Crockford Base32, the alphabet behind ULIDs.
  • Encode and decode Base45, the format inside alphanumeric QR codes and EU digital COVID certificates.
  • Turn the Ascii85 block from a PDF or PostScript file back into bytes.
  • Encode and decode Z85, the ZeroMQ flavour of Base85.
  • Encode a number or id in Base62 for a short link.
  • Convert hex bytes straight into any base without going through text first.
  • Convert text to hex (Base16) and back.

How to use the Base Encoder & Decoder

  1. 1Pick Encode or Decode.
  2. 2Choose the base, then the alphabet variant when the base has more than one.
  3. 3Set the options that apply, like padding, letter case or Base58Check.
  4. 4Type or paste your data. The result updates as you type and can be copied or downloaded.
  5. 5Press Swap to flip the direction and carry the result over as the new input.

Groups of bytes, or one big number

Base16, Base32, Base45, Base64 and Base85 cut the input into fixed groups and encode each group on its own. A byte lands in the same place no matter how long the payload is, and joining two encoded strings joins their data.

Base36, Base58 and Base62 work the other way. They read the whole payload as a single big-endian number and rewrite that number in the new base, which is why they cost more work on long inputs and why nothing about the result lines up with byte boundaries.

A number has no memory of the zeros in front of it, so the big-number bases write one leading alphabet character per leading zero byte. That rule is where the 1 at the start of a Bitcoin address comes from, and this tool round-trips those bytes for Base36, Base58 and Base62 alike.

Alphabets that look alike but are not

Base58 has three alphabets in real use. Bitcoin, IPFS, Monero and Solana share one, the XRP Ledger reorders the same 58 characters, and Flickr puts lowercase before uppercase. A string only decodes under the alphabet that wrote it, so switching the variant is usually the fix when a valid-looking string comes out as noise.

Base62 has the same problem in miniature. Some libraries order it digits, uppercase, lowercase and others digits, lowercase, uppercase, and both are offered here.

Base85 is really two encodings. Ascii85 comes from PostScript and PDF, allows a short final group and can shorten four zero bytes to a single z. Z85 comes from ZeroMQ, uses an alphabet that survives shell quoting, and only encodes whole four-byte groups.

Decoding what people actually paste

Whitespace and line breaks are ignored, so a wrapped block copied out of a config file or an email header decodes without cleaning it up first. Base45 is the exception, because a space is one of its 45 characters, so only line breaks are dropped there.

Padding is optional on the way in. A Base32 secret with the = characters trimmed off decodes the same as a padded one, and Crockford Base32 additionally reads I and L as 1, reads O as 0 and treats hyphens as decoration.

When a character does not belong to the alphabet, the tool names the character, gives its position and shows the surrounding text with that character marked, instead of refusing with a generic message.

Bytes that are not text

Plenty of encoded strings decode to raw bytes rather than readable text: a public key, a hash, an image. When the result is not valid UTF-8, the tool shows it as a preview or a hex dump you can download instead of mangling it into replacement characters. Send those bytes to the Hex Viewer for a closer look, or press Swap to bring them back as hex and re-encode them in a different base.

The same works in reverse. Set the input format to hex bytes and you can feed a version byte plus a hash straight into Base58Check, which is exactly how a Bitcoin address is built.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Escape text into HTML entities or decode entities back to plain text. Choose named or numeric entities, escape only the unsafe characters or everything outside ASCII, and read the result live.

Paste anything that looks encoded and this tool works out what was used and undoes it, layer by layer. The whole BaseXX family from Base16 to Base85, binary, URL escapes, HTML entities, ROT13 and gzip, Brotli or Zstandard compression are detected in any combination, and every step of the chain is reported.

Turn any text into a clean URL slug. Transliterates accents and non-Latin scripts to ASCII, with options for the separator, letter case and a length limit. Handles many titles at once, one line per slug.

Escape or unescape a string for JSON, JavaScript, regex, shell, SQL, CSV, XML and more. Paste text, pick the target format and copy the result, in either direction.

Encode text for use in URLs or decode percent-escaped strings back to readable text. Choose component, full-URL or form encoding, unwrap double-encoded strings, and break a URL into its parts with every query parameter decoded.