Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings back to plain text.
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data (images, files, arbitrary bytes) into a string of 64 printable ASCII characters: AβZ, aβz, 0β9, +, and /. It was designed to safely transmit binary data over systems that only handle text β email protocols (SMTP), HTML data URIs, and JSON payloads. Base64 is not encryption: it is reversible by anyone and should never be used to hide sensitive data.
Base64 character set (64 chars + padding):
A-Z = 0β25 (uppercase letters)
a-z = 26β51 (lowercase letters)
0-9 = 52β61 (digits)
+ = 62
/ = 63
= = padding character
Encoding process:
Input bytes grouped in 3s β 24 bits β split into four 6-bit values
β each 6-bit value maps to one of the 64 characters
Size overhead: Base64 is 33% larger than the original binary
e.g. 3 bytes β 4 characters (3/4 = 75% efficiency)Base64 vs. Base64URL
Standard Base64 uses + and / characters, which are special characters in URLs. Base64URL is a URL-safe variant that replaces + with - and / with _, and omits = padding. Base64URL is used in JWTs, OAuth tokens, and any context where the encoded string appears in a URL.
Standard Base64: "SGVsbG8+V29ybGQ=" (+ and / may appear)
Base64URL: "SGVsbG8-V29ybGQ" (- instead of +, _ instead of /, no =)
Used in:
Standard Base64: email attachments, data URIs (<img src="data:image/png;base64,...">)
Base64URL: JWTs, OAuth codes, URL parametersCommon Base64 use cases
Frequently asked questions
What is Base64 actually used for?
It encodes binary data as plain ASCII text so it can travel safely through text-only systems β embedding images in CSS/HTML data URIs, encoding email attachments, and carrying binary data inside JSON.
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption β anyone can decode it instantly. Never use it to protect passwords or sensitive data.
Why is Base64 output larger than the input?
Base64 represents every 3 bytes as 4 characters, so the encoded result is about 33% larger than the original binary data.
Is my data uploaded anywhere?
No. Encoding and decoding run locally in your browser, so the text you enter never leaves your device.
Encodes plain text to Base64 format or decodes Base64 strings back to plain text. Base64 is used to safely transmit binary data or special characters over systems that only handle ASCII text.
3 bytes input β 4 Base64 characters. Output ~33% larger than input.