Base64 Encoder/Decoder: Text-Safe Encoding for Binary Data
Base64 encodes any binary data as plain ASCII text — letters, digits, +, /, =. It's not encryption (anyone can decode it), but it makes binary safe to embed in email, JSON, URLs, or anywhere else where 'text only' is required.
Email, HTTP headers, JSON strings, and URL parameters all expect text. Binary data (images, files, encryption keys) needs an encoding that converts arbitrary bytes into a text-safe form. Base64 represents three input bytes as four output characters from a 64-character alphabet — hence the name.
Common uses: data: URIs for inline images, JWT tokens, OAuth signatures, email attachments (RFC 2045), basic authentication headers, image embedding in CSS.
Common Base64 patterns
- •Plain Base64 (with + / =) — used in MIME, JSON, etc.
- •URL-safe Base64 (with - _) — replaces + and / which have URL meaning
- •Padding (= signs at end) — required by some implementations, ignored by others
- •Multi-byte input — Base64 encodes any byte stream including UTF-8 text
Extended FAQ
Is Base64 encryption?
No. It's a reversible encoding — anyone can decode Base64 with no key. Use it for transport convenience, never for secrecy.
Why is Base64 33% larger than the original?
Because every 3 bytes become 4 characters. The math is unavoidable for ASCII-safe representation of arbitrary bytes.
Are my pasted strings stored?
No — runs entirely in your browser.
