User Rating 0.0
Total Usage 0 times
Accepts standard and URL-safe Base64 (RFC 4648)
Is this tool helpful?

Your feedback helps us improve.

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.

base64 decimal converter encoding decoding binary bytes

Formulas

Each Base64 character ci maps to a 6-bit index Ii in the alphabet. A group of 4 Base64 characters encodes 3 bytes:

B0 = (I0 × 4) + I116
B1 = ((I1 mod 16) × 16) + I24
B2 = ((I2 mod 4) × 64) + I3

To reconstruct a single unsigned integer from n decoded bytes:

D = n1i=0 Bi × 256(n 1 i)

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 CharacterIndex (Decimal)Binary (6-bit)
A0000000
B1000001
C2000010
D3000011
M12001100
Z25011001
a26011010
m38100110
z51110011
052110100
153110101
961111101
+62111110
/63111111
=PaddingN/A
- (URL-safe)62111110
_ (URL-safe)63111111

Frequently Asked Questions

Padding characters (=) signal that the final group contains fewer than 3 bytes. One = means 2 bytes were encoded; two = signs mean 1 byte. The converter strips padding before decoding and only outputs the valid bytes. If you remove padding manually, the converter will attempt to infer the correct byte count, but malformed input may produce an error.
Byte Array mode decodes the Base64 string and lists each byte as a separate decimal value in the range 0 - 255. Integer mode interprets those same bytes as a single big-endian unsigned integer. For example, SGk= decodes to bytes [72, 105] in array mode, but produces 18537 (72 × 256 + 105) in integer mode.
Standard Base64 uses + and /, which are reserved characters in URLs and filenames. RFC 4648 Section 5 defines a URL-safe variant that substitutes - for + (index 62) and _ for / (index 63). The decimal values remain identical; only the encoding alphabet differs. Enable the URL-safe toggle to handle this variant.
JavaScript's Number type loses precision beyond 253 1 (9007199254740991). This converter detects when the decoded byte sequence would exceed that threshold and automatically switches to BigInt arithmetic. The result is displayed as an exact decimal string with no floating-point truncation.
Yes. Paste the raw Base64 string (without data URI prefixes like data:image/png;base64,) and the converter will decode it into its byte array. For files, the byte array output is typically more useful than the integer representation. The converter processes strings up to approximately 100 KB of Base64 text without performance issues.
Use the Alphabet Index mode on a single character. For example, A must return 0, B returns 1, and / returns 63. For multi-character strings, cross-reference the byte array output against the ASCII table: SGVsbG8= should decode to bytes [72, 101, 108, 108, 111], which correspond to the ASCII string "Hello".