Base64 Encoder / Decoder
Encode and decode Base64 text, URLs and files including image preview.
Frequently Asked Questions
What is Base64 encoding?
Base64 converts binary data into a text string using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is widely used to embed binary data inside text-only formats: images in CSS/HTML (data URIs), attachments in email (MIME encoding), and binary data in JSON/XML APIs.
Why is Base64 output about 33% larger than the input?
Base64 encodes every 3 bytes of binary data as 4 ASCII characters (3 bytes × 8 bits = 24 bits; 4 Base64 characters × 6 bits = 24 bits). The 4/3 ratio means output is always ~33% larger. Padding characters (=) are added to make the output length a multiple of 4.
What is URL-safe Base64?
Standard Base64 uses + and / which are special characters in URLs and may cause parsing issues. URL-safe Base64 (RFC 4648) replaces + with - (hyphen) and / with _ (underscore), making the encoded string safe to use in URLs, filenames, and HTTP headers without percent-encoding.
Can I use Base64 to hide or encrypt sensitive data?
No — Base64 is encoding, not encryption. It is trivially reversible by anyone who recognises it. Never use Base64 as a security measure for passwords, tokens, or sensitive data. Use proper encryption (AES, RSA) or hashing (bcrypt, Argon2) for security purposes.