Base64 Encoder & Decoder
Encode text to Base64 and decode it back instantly — UTF-8 safe, so emojis and accents survive the round trip. Free, fast and private: your text never leaves your device.
How to encode and decode Base64 online
- Type or paste your text into the Input box on the left.
- Click Encode → to convert text to Base64, or Decode ← to turn Base64 back into readable text.
- Use Copy output to grab the result, or Clear to start over.
Everything happens in the browser tab, so the encode and decode buttons respond instantly even for large blocks of text — there is no upload, no queue, and no rate limit. Because the round trip is symmetric, you can paste an encoded string straight back into the input and decode it to confirm the original came through untouched.
Why use a Base64 converter?
Base64 lets you carry binary or special-character data safely through channels that only expect plain text — think JSON payloads, data URIs in CSS, email attachments, basic-auth headers, and JWT segments. Hand-encoding it is error-prone, especially with Unicode, where naïve tools mangle emojis and accents. This converter uses a UTF-8 safe round trip so every character comes back exactly as you sent it, and it runs entirely in your browser, so even sensitive tokens or credentials stay on your machine.
How Base64 actually works
Base64 takes binary data three bytes (24 bits) at a time and splits it into four 6-bit groups. Each group maps to one printable character from a 64-symbol alphabet: A–Z, a–z, 0–9, plus + and /. When the input length is not a multiple of three, one or two = characters pad the final block. This is why every Base64 string is roughly one third larger than its source, and why valid strings always have a length divisible by four. Understanding this makes most decode errors obvious: a string whose length is not a multiple of four, or that contains characters outside the alphabet, is not valid Base64 and will fail to decode.
Common use cases
- Data URIs — embed a small image, font, or SVG directly in CSS or HTML as
data:image/png;base64,…to save an HTTP request. - JSON and API payloads — send binary blobs, file contents, or signatures through JSON fields that only accept strings.
- Email (MIME) — attachments are Base64-encoded so 8-bit binary survives mail servers built for 7-bit text.
- Basic authentication — HTTP Basic auth sends
user:passas a single Base64 token in theAuthorizationheader. - JWTs — each segment of a JSON Web Token is Base64URL-encoded; decode one to read its header and claims.
Encoding vs. encryption vs. hashing
These three are often confused, but they solve different problems. Pick the wrong one and you risk leaking data you assumed was protected.
| Technique | Reversible? | Needs a key? | Use it for |
|---|---|---|---|
| Base64 encoding | Yes, by anyone | No | Safe transport of data through text-only channels |
| Encryption (e.g. AES) | Yes, with the key | Yes | Keeping data confidential |
| Hashing (e.g. SHA-256) | No | No | Fingerprints, integrity checks, password storage |
Tips & gotchas
- Base64 is not security — it hides nothing. Decoding takes one click, so never treat an encoded secret as protected.
- Expect about 33% size growth. For large files this overhead adds up, so prefer raw binary transport when the channel allows it.
- Watch for line breaks and whitespace pasted from email or terminals — strip them before decoding if a tool is strict about them.
- For URLs and filenames, use the URL-safe variant (
-and_instead of+and/) to avoid escaping.