Base64 Encode / Decode

Encode text to Base64 or decode Base64 back to text — UTF-8 safe, entirely in your browser.

928 views

What Base64 Actually Does

Base64 represents binary data using 64 printable characters (A-Z, a-z, 0-9, +, /), so it can travel through channels built for text: JSON payloads, data: URIs, basic-auth headers, email attachments. Every 3 bytes become 4 characters — output is ~33% larger, and = pads the tail. This tool handles Unicode correctly (proper UTF-8 encoding first), so "çğü 😀" round-trips intact — naive btoa() would throw on it.

Base64 is not encryption — it is a reversible representation with zero secrecy. Anything sensitive needs actual encryption; Base64 only makes bytes text-safe. Everything here runs locally in your browser; input never leaves your device.

Frequently Asked Questions

Why does my decoded output look garbled?

Usually the input was not valid Base64 (truncated, or with URL-safe -_ characters instead of +/), or the original bytes were not text at all. This tool decodes URL-safe variants automatically.

Can I encode files?

This tool is for text. For files, the pattern is a data: URI — most languages offer one-liners (PHP base64_encode(file_get_contents(...)), JS FileReader.readAsDataURL).

Is Base64 safe for passwords?

No — it is trivially reversible. HTTP Basic auth uses it only for transport formatting and relies on TLS for secrecy. Store passwords hashed (bcrypt/argon2), never Base64.

Similar Tools