Paste text or Base64 below to instantly encode or decode it. Everything runs in your browser — nothing you enter here is uploaded, stored, or logged.
Your text is processed locally in your browser and is not uploaded to our server.
What is Base64?
Base64 is a way of representing arbitrary binary data — or any text — using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /, with = used for padding). It exists because many older systems, protocols, and text-based formats (email, JSON, URLs, config files) were never designed to safely carry raw binary bytes, so Base64 gives them a text-safe stand-in instead.
How Base64 Encoding Works
Base64 groups the input’s raw bytes three at a time (24 bits) and re-slices those 24 bits into four 6-bit chunks, each mapped to one of the 64 allowed characters. When the input length isn’t a multiple of three bytes, = padding characters fill the remainder. This is why Base64 output is always about a third longer than the original input, and why encoded output length is a reliable multiple of 4 characters.
Encoding vs Decoding
Encoding converts your original text (including Unicode) into its Base64 representation. Decoding reverses that process exactly, reconstructing the original text from the Base64 string. This tool handles both directions correctly for Unicode text — internally converting to and from UTF-8 bytes rather than relying on older, fragile string-encoding tricks — so round-tripping any text, including non-English scripts and emoji, restores it exactly.
Common Use Cases
- Embedding small images or fonts directly inside CSS or HTML as
data:URIs. - Carrying binary attachments inside text-based formats like email (MIME) or JSON payloads.
- Encoding credentials for HTTP Basic Authentication headers.
- Storing binary-ish data safely in systems that only accept plain text, like some environment variables or config files.
Limitations of Base64
- It’s not compression — encoded output is roughly 33% larger than the original.
- It’s not encryption or security — see the section below.
- Standard alphabet isn’t URL-safe as-is —
+and/have special meaning in URLs, which is why a separate “Base64URL” variant exists for that specific use case.
Security & Privacy Clarification
Base64 is encoding, not encryption. It provides zero confidentiality — anyone who sees a Base64 string can decode it back to the original text in seconds, with no key or password required. Never use Base64 alone to protect sensitive data such as passwords, tokens, or personal information; use real encryption for that. Separately, on this page specifically: your input is processed entirely in your browser using JavaScript’s built-in APIs and is never sent to, stored on, or logged by our server.
FAQ
Is Base64 encryption?
No. Base64 is a reversible text representation, not a security mechanism. Decoding it requires no secret of any kind.
Why did decoding fail?
Decoding fails when the input contains characters outside the Base64 alphabet, has incorrect padding, or — once decoded — doesn’t form valid UTF-8 text. Double-check you copied the full string.
Does this tool handle Unicode and emoji correctly?
Yes. Text is converted to UTF-8 bytes before encoding and decoded back the same way, so round-tripping any Unicode text — including emoji and non-Latin scripts — restores it exactly.
Is my text uploaded anywhere?
No. Encoding and decoding both happen locally in your browser. Your input is never sent to our server.