Racira Calculator

Base64 Encoder

13 bytes · 13 characters

Encoded Output
SGVsbG8sIFdvcmxkIQ==
20 characters
Input
13 B
Output
20 ch
Expansion
54%

Conversion Details

Input Text"Hello, World!"
Input Size13 bytes
Encoded OutputSGVsbG8sIFdvcmxkIQ==
Output Length20 characters
Padding Characters2 "=" sign(s)
Expansion Ratio1.538× (33% overhead)

Input vs Output Size

Summary Statistics

Input Bytes:13
Output Characters:20
Expansion:1.54×
Padding:2 chars
Size Increase:+54%
Lines at 76 Chars:1

What Is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data using only 64 ASCII characters: A–Z, a–z, 0–9, +, and /. Every 3 bytes of input (24 bits) are split into four 6-bit groups and mapped to a Base64 character, producing output that is exactly 4/3 the size of the input. The Base64 encoder on this page converts any UTF-8 text — including emoji and non-Latin scripts — into this portable format, and can decode it back with the flip of a switch.

The Base64 Algorithm

Encoding works by reading the input as a stream of bytes. Groups of three bytes become four Base64 characters; a leftover of one or two bytes becomes two or three characters plus one or two "=" padding signs, keeping the total output length a multiple of four. Decoding reverses the process: each Base64 character maps back to its 6-bit value, the bits are regrouped into bytes, and the padding is discarded. The entire process is lossless — what you encode, you can decode exactly.

Why 33% Overhead?

Because Base64 uses only 64 symbols, each character carries 6 bits of information. Three 8-bit input bytes (24 bits) therefore need exactly 24 ÷ 6 = 4 output characters. That fixed ratio of 4:3 is why Base64 always inflates data by about a third. It is a deliberate trade-off: a modest size increase in exchange for data that survives any text-only channel, from old email gateways to JSON payloads.

Common Uses

Base64 appears everywhere in modern web development: data URIs that embed images directly in HTML or CSS, JWT tokens, MIME email attachments, and storing binary blobs inside JSON. Understanding it helps you debug tokens, shrink payloads, and recognize when data you are looking at is simply encoded rather than encrypted.

Frequently Asked Questions

Related Calculators