Base64 Encoder
Encode and decode text or binary data to Base64.
About this tool
Base64 turns arbitrary binary data into a 64-character alphabet (A–Z, a–z, 0–9, +, /) that survives any text-only transport — email bodies, JSON strings, URL parameters, data: URIs. Our tool encodes and decodes both text and binary in your browser, with auto-detection between the two directions: paste cleartext, get Base64; paste Base64, get cleartext (or a downloadable file if the result is binary).
The tool supports both standard Base64 (RFC 4648 §4) and URL-safe Base64 (RFC 4648 §5, where +/ become -_) — the variant you want depends on context. JSON Web Tokens, query-string parameters, and SHA-based hashes typically use URL-safe; email MIME, X.509 certificates, and most "what is in the clipboard" cases use standard. Optional padding (=) can be stripped for compact tokens.
When to use this tool
- Decoding a JWT. Strip the dot-separated segments, drop each through the decoder, and read the JSON. (The JWT Decoder tool does this for you in one click.)
- Inspecting an inline
data:URI. Paste the part afterdata:image/png;base64,and download the original PNG. - Embedding a small binary in JSON or a config file. Logos, certificates, signing keys all travel as Base64 in YAML/JSON.
- Debugging email attachments. A MIME part starting with
Content-Transfer-Encoding: base64is just a Base64-wrapped binary — decode it here to inspect.
What Base64 is not
Base64 is not encryption. The encoding is fully reversible by anyone — there is no key, no obscurity. If you see "we Base64 the password for security", that is a security bug, not a feature. The 4-to-3 expansion (every 3 bytes become 4 characters) also makes Base64 ~33% larger than the original — fine for small payloads, wasteful for multi-megabyte files. Use it for transport compatibility, not for size or secrecy.Frequently asked questions
Why is the encoded string 33% longer than the original?
What is the difference between standard and URL-safe Base64?
+ and /; URL-safe Base64 uses - and _ (because + and / have special meaning in URLs). Padding also differs — URL-safe variants often drop the trailing =. JWTs and OAuth use URL-safe; most other contexts use standard. Our tool auto-detects and offers both.
Is Base64 encryption?
Can I encode files?
base64 utility is faster. The reverse also works: paste a Base64 string and download it as the binary it represents — useful for restoring inline-encoded files from emails or APIs.