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
Run
Processes in this browser; cancel at any time
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
- Type or paste the text to encode or the data to decode, or select Use example.
- Choose an “Encoding”, such as “Base64” or “Base58 (Bitcoin)”, and set “Direction” to “Encode” or “Decode”.
- Pick the “Text character set”. UTF-8 is the default; choose “Hex bytes” for binary data such as keys and hashes.
- 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.
Related tools
Character set encoding and mojibake repair
Show the bytes of text in UTF-8, GBK, GB18030, Big5, Shift_JIS and more as hex, turn hex back into text, or repair mojibake from text read in the wrong character set.
Unicode, HTML, URL and Punycode escapes
Convert text to and from \u escapes, HTML numeric entities, percent-encoding in any character set (such as GBK URLs), Quoted-Printable and Punycode domains.
Encode and decode text
Encode or decode Base64, Base64URL, URL, hexadecimal or HTML entities. Encoding is not encryption.
Base64 to image or file
Turn Base64 or a data: URI back into a file such as an image; the type comes from the content or the URI.
Image or file to Base64
Encode images or any other file as Base64 or as a data: URI to paste into HTML, CSS or JSON.
Byte radix and endianness converter
Convert bytes between hex, binary, octal, unsigned or signed decimal, Base64 and UTF-8 text, and swap byte order between big and little endian in 2, 4 or 8-byte words.