Base64 to Decimal Converter
Convert Base64 encoded strings to decimal values instantly. Decode Base64 to byte arrays, integers, or individual character indices with full validation.
| Position | Character | Base64 Index | Binary (6-bit) | Decoded Byte(s) |
|---|
About
Base64 encoding maps every 6 bits of binary data onto one of 64 printable ASCII characters (A - Z, a - z, 0 - 9, +, /). This tool reverses that process and presents the result as decimal numbers. You can decode an entire Base64 string into its constituent byte values (0 - 255), interpret those bytes as a single big-endian unsigned integer, or resolve each Base64 character to its alphabet index (0 - 63). Incorrect padding or illegal characters will produce silently corrupt output in many tools. This converter validates the input against RFC 4648 before any computation occurs.
The tool approximates no values. Every output is the exact decimal representation of the decoded binary payload. Note that Base64 strings whose decoded byte length exceeds JavaScript's safe integer range (253 − 1) will be displayed as a BigInt string to avoid precision loss. Pro tip: if your Base64 input contains URL-safe variants (- and _ instead of + and /), enable the URL-safe toggle before converting.
Formulas
Each Base64 character ci maps to a 6-bit index Ii in the alphabet. A group of 4 Base64 characters encodes 3 bytes:
To reconstruct a single unsigned integer from n decoded bytes:
Where Bi = the i-th decoded byte (0 - 255), Ii = the Base64 alphabet index (0 - 63), and D = the resulting decimal integer in big-endian byte order. Values exceeding 253 − 1 use BigInt arithmetic.
Reference Data
| Base64 Character | Index (Decimal) | Binary (6-bit) |
|---|---|---|
| A | 0 | 000000 |
| B | 1 | 000001 |
| C | 2 | 000010 |
| D | 3 | 000011 |
| M | 12 | 001100 |
| Z | 25 | 011001 |
| a | 26 | 011010 |
| m | 38 | 100110 |
| z | 51 | 110011 |
| 0 | 52 | 110100 |
| 1 | 53 | 110101 |
| 9 | 61 | 111101 |
| + | 62 | 111110 |
| / | 63 | 111111 |
| = | Padding | N/A |
| - (URL-safe) | 62 | 111110 |
| _ (URL-safe) | 63 | 111111 |