YourTools.
简体中文
Back to the catalog
Tools

Base16/32/58/64/85/91 encoding

Encode or decode Base16, Base32, Base58, Base62, Base64, Ascii85, Z85 and basE91, choosing the character set of the text, or hex for raw bytes.

Process locally

Files stay in this browser session. Closing or clearing releases them.

Add text

Type or paste the text to process

Adjust settings

Optional: Encoding, Direction, Text character set

Base16/32/58/64/85/91 encoding

Run

Processes in this browser; cancel at any time

Add text first

About this tool

Encode or decode Base16, Base32, Base58, Base62, Base64, Ascii85, Z85 and basE91. Use it to read a Base32 two-factor secret as hex bytes, to encode Chinese text in GBK before turning it into Base64 for an older system, or to work with Base58 and Ascii85 data.

Choose how the text becomes bytes: UTF-8, GBK, GB18030, Big5, Shift_JIS and other character sets, or hex to enter and get raw bytes. Base58 and Base62 encode up to 32 KB and decode up to 64 KB of text; the other encodings take up to 1 MB. It all runs in your browser, and nothing is uploaded.

How to use it

  1. Type or paste the text to encode or the data to decode, or select Use example.
  2. Choose an “Encoding”, such as “Base64” or “Base58 (Bitcoin)”, and set “Direction” to “Encode” or “Decode”.
  3. Pick the “Text character set”. UTF-8 is the default; choose “Hex bytes” for binary data such as keys and hashes.
  4. Select Run, then preview the result and download it as a text file.

Formats and limits

Input
Text
Output
Plain text
Size limit
1 MB
Settings
Encoding; Direction (Encode, Decode); Text character set
Privacy
Files stay in the current browser session. No file bytes are uploaded.
Price
Free, no sign-up

Common questions

Why does the same Chinese text give different Base64?

Base64 encodes bytes, and the same text has different bytes in different character sets. For example, 你好 is 5L2g5aW9 in UTF-8 but xOO6ww== in GBK. Pick the character set the other side expects under “Text character set”.

What if decoding says the result is not valid text?

The decoded bytes must be valid in the chosen character set. Try the character set the data was written in, or choose “Hex bytes” to see the raw bytes of binary data such as a key. To turn Base64 back into an image or file, use the “Base64 to image or file” tool.

How is Base64URL different from Base64?

Base64URL uses - and _ instead of + and / and leaves out the = padding, so it fits in URLs and file names. When decoding, this tool accepts either alphabet, with or without padding.

Are there rules for Ascii85 and Z85?

Ascii85 follows Adobe's style: the output has no <~ ~> markers, decoding works with or without them, and four zero bytes become z. Z85 needs data whose length is a multiple of 4 bytes, and Z85 text to decode must be a multiple of 5 characters.

Why does encoding say a character cannot be encoded?

The chosen character set has no such character; GBK, for example, cannot hold emoji. The error names the character and its position. Switch to UTF-8 or GB18030, which can encode it.