Any Base to UTF8 Converter
Convert between any numeral base (Binary, Octal, Hex, Base32, Base58, Base64, Base85) and UTF-8 text. Encode and decode instantly.
About
Character encoding errors corrupt data silently. A single misinterpreted byte in a Base64 payload breaks an API response. A wrong hex sequence in a firmware flash bricks hardware. This tool converts between any standard numeral base (2, 8, 10, 16, 32, 36, 58, 64, 85) and valid UTF-8 text. It handles the full Unicode range including multi-byte sequences for CJK characters and emoji, where a single code point like U+1F600 requires 4 bytes in UTF-8. The converter operates entirely client-side with no server round-trips.
Base58 uses the Bitcoin alphabet (no 0, O, I, l) to avoid visual ambiguity. Base85 follows the Ascii85 (btoa) variant used in PostScript and PDF. Base32 implements RFC 4648 with optional padding. Limitations: this tool assumes well-formed input. Malformed sequences (e.g., a lone surrogate in UTF-16 re-encoded as UTF-8) will produce a decoding error rather than garbage output.
Formulas
For numeric bases (Base b where b β {2, 8, 10, 16, 36}), each UTF-8 byte is independently converted. Encoding a byte array to base b:
where repr(v, b) converts integer v to its string representation in base b, zero-padded to a fixed width (e.g., 8 digits for binary, 2 for hex).
Base64 groups 3 input bytes into 4 output characters using 6-bit indices:
ck = alphabet[(n >> (18 β 6k)) β§ 63] for k = 0..3
Base58 treats the entire byte array as a single big-endian unsigned integer and performs repeated division:
r = N mod 58
N = βN Γ· 58β
prepend alphabet[r]
Leading zero bytes map to the character 1 (first in the Base58 alphabet), preserving byte-length information.
Base85 (Ascii85) groups 4 bytes into a 32-bit integer and extracts 5 digits in base 85:
ck = chr((βn Γ· 85(4βk)β mod 85) + 33)
Where bi = individual bytes, ck = output characters, N = big integer value of the full byte array, alphabet = the character set for the given base, chr = ASCII character from code point.
Reference Data
| Base | Alphabet / Charset | Bits per Char | Use Case | Padding | Example ("A") |
|---|---|---|---|---|---|
| Base2 (Binary) | 0 - 1 | 1 | Low-level protocols, bitfields | None | 01000001 |
| Base8 (Octal) | 0 - 7 | 3 | Unix file permissions, legacy systems | None | 101 |
| Base10 (Decimal) | 0 - 9 | 3.32 | Human-readable byte values | None | 65 |
| Base16 (Hex) | 0 - 9, A - F | 4 | Memory dumps, color codes, hashes | None | 41 |
| Base32 (RFC 4648) | A - Z, 2 - 7 | 5 | TOTP tokens, DNS, case-insensitive IDs | = | IE====== |
| Base36 | 0 - 9, A - Z | 5.17 | Short URLs, compact numeric IDs | None | 1T |
| Base58 (Bitcoin) | 1 - 9, A - HJ - NP - Z, a - km - z | 5.86 | Bitcoin addresses, IPFS CIDs | None | 28 |
| Base64 (RFC 4648) | A - Z, a - z, 0 - 9, +, / | 6 | Email (MIME), data URIs, JWT | = | QQ== |
| Base85 (Ascii85) | ! - u (ASCII 33 - 117) | 6.41 | PostScript, PDF streams | None | 5l |
| Efficiency comparison for encoding 1024 random bytes | |||||
| Base2 | Output size | 8192 chars (800% overhead) | |||
| Base16 | Output size | 2048 chars (200% overhead) | |||
| Base64 | Output size | 1368 chars (133% overhead) | |||
| Base85 | Output size | 1280 chars (125% overhead) | |||