Base64 Encoder
Base64 Encoder
13 bytes · 13 characters
Conversion Details
| Input Text | "Hello, World!" |
| Input Size | 13 bytes |
| Encoded Output | SGVsbG8sIFdvcmxkIQ== |
| Output Length | 20 characters |
| Padding Characters | 2 "=" sign(s) |
| Expansion Ratio | 1.538× (33% overhead) |
Input vs Output Size
Summary Statistics
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
Home Loan Calculator
Calculate home loan EMI, total interest, and amortization schedule.
Auto Loan Calculator
Detailed auto loan with trade-in, taxes, fees, and amortization.
Bike Loan Calculator
Calculate bike loan EMI, total cost, and repayment breakdown.
Boat Loan Calculator
Estimate boat financing payments, interest, and amortization.
Student Loan Calculator
Calculate student loan payments with income-driven repayment plans.
Gold Loan Calculator
Calculate gold loan amount based on gold weight, purity, and LTV ratio.
USDA Loan Calculator
Calculate USDA loan payments with guarantee fee and income eligibility.
Loan Against Property Calculator
Calculate LAP EMI based on property value and loan-to-value ratio.