🔢 Base Encoding Visualizer – Multi-Base Encoder & Decoder
The Base Encoding Visualizeris an interactive, educational tool that encodes any text, hex bytes, or binary bits into multiple base representations simultaneously — and decodes them back. Whether you're a developer debugging serialization issues, a student learning data encoding, or a security engineer comparing encoding schemes, this tool gives you an instant side-by-side view.
📊 Supported Encoding Bases
The tool supports 11 encoding bases in a single click:
| Base | Alphabet Size | Common Use | Overhead vs. Raw |
|---|---|---|---|
| Base2 (Binary) | 2 symbols (0, 1) | Low-level bit manipulation, hardware | +700% |
| Base8 (Octal) | 8 symbols (0–7) | Unix file permissions, legacy systems | ~+167% |
| Base10 (Decimal) | 10 symbols (0–9) | Human-readable byte values | ~+140% |
| Base16 (Hex) | 16 symbols (0–9, A–F) | Cryptographic hashes, color codes, hex dumps | +100% |
| Base32 | 32 symbols (A–Z, 2–7) | TOTP secrets, case-insensitive storage, QR codes | +60% |
| Base58 | 58 symbols (no 0, O, I, l) | Bitcoin addresses, IPFS CIDs | ~+37% |
| Base62 | 62 symbols (0–9, A–Z, a–z) | URL shorteners, session tokens | ~+34% |
| Base64 | 64 symbols + padding | Email MIME, JWT, data URIs, HTTP Basic Auth | +33% |
| Base64 URL-safe | 64 symbols, no +/= chars | JWT signatures, URL query parameters | ~+33% |
| Base85 (Ascii85) | 85 printable ASCII symbols | PDF content streams, Git binary patches | +25% |
| Base91 | 91 printable ASCII symbols | Compact binary-to-text for email/NNTP | ~+23% |
⚙️ How Base Encoding Works
Every base encoding scheme works by treating raw bytes as a large number, then expressing that number in a different numeral system using a specific alphabet. The fundamental trade-off is between alphabet size (how many unique symbols you use) and output length (how many characters are needed to represent the same data).
Base64 is the most commonly used encoding. It groups input bytes into 3-byte (24-bit) blocks, then splits each block into four 6-bit chunks. Each 6-bit value (0–63) is mapped to a character in the Base64 alphabet (A–Z, a–z, 0–9, +, /). If the input length isn't divisible by 3, padding characters (=) are appended. The formula for output length is: ⌈n / 3⌉ × 4 characters for n input bytes.
Base16 (Hex) is simpler — each byte is expressed as two hexadecimal digits, giving exactly 2× the input length. Base32 uses 5-bit groups, requiring ⌈n / 5⌉ × 8 characters per block. Base85 encodes every 4-byte block into 5 Ascii85 characters (⌈n / 4⌉ × 5), giving only 25% overhead — the most compact standardized text encoding.
🔍 Three Views Explained
The tool offers three result views:
- Comparison Table — a sortable overview of all selected bases with truncated output, character count, and size overhead badge. Great for quickly comparing encoding efficiency.
- Result Cards — one card per base with the full encoded output, so you can scroll and copy each result independently. Ideal when you need to paste into an application.
- Bit Layout — shows the raw 8-bit binary representation of each input byte, color-coded into nibbles (4-bit halves). This connects directly to Base16 encoding: the high nibble is the first hex digit, the low nibble is the second.
🔄 Encode vs. Decode
Toggle to Decode mode to reverse the pipeline. Paste any Base64, Base32, Base16, or binary string and the tool will recover the original bytes and attempt to interpret them as UTF-8 text. If the bytes are not valid UTF-8, the tool shows escaped hex sequences (\x4D\x61\x6E) instead.
📥 Input Modes
In Encode mode, choose between three input types:
- Text — any UTF-8 string; bytes are extracted via
TextEncoder. Multi-byte characters (e.g., emoji or CJK) are handled correctly. - Hex Bytes — paste raw hex like
48656c6c6f. Must be even-length, containing only0–9anda–f. - Binary Bits — paste a bit string like
01001000 01100101. Length must be a multiple of 8.
🛡️ Privacy & Limitations
All encoding and decoding is performed entirely client-side in your browser — no data is transmitted to any server. Input is limited to 10,000 characters to keep the browser responsive. For large binary files, consider specialized tools or command-line utilities like openssl base64 or xxd.
Note that Base58 and Base62 are big-integer encodings (not fixed-chunk) and their output length grows logarithmically with the numeric value of the input, so the overhead estimate shown is an approximation for typical short inputs.