Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 strings. Unicode supported.
About Base64 encoding
Base64 is a way to represent arbitrary binary data using only printable ASCII characters. Every three bytes of input produce four characters of output, drawn from a 64-letter alphabet (A-Z, a-z, 0-9, plus + and /). The encoding is a transport wrapper, not a compression scheme — the result is roughly 33% larger than the input — and it is not a form of encryption.
Base64 is encoding, not encryption
Anyone who can read a Base64 string can decode it back to the original bytes in a single line of code. Never use Base64 to "hide" passwords, tokens, API keys or any other sensitive value — it provides zero confidentiality. For real protection, encrypt the data first, then optionally Base64 the ciphertext for transport.Despite those caveats, Base64 is everywhere. It appears in data: URLs that embed images directly into HTML (see our Image ↔ Base64 tool), in HTTP Basic Auth headers, in PEM-encoded TLS certificates, in JWT headers and payloads, in email attachments via MIME, and in any system that needs to fit binary data into a text-only field. This tool encodes and decodes both UTF-8 strings and raw bytes safely in the browser.
How to use
- Choose Encode or Decode mode using the toggle.
- Paste your text or Base64 string into the input area.
- The output updates as you type. Errors during decoding (invalid characters, bad padding) are flagged inline.
- Use Copy to copy the result, or Swap to round-trip the value back through the other direction.
Common use cases
- Embedding small images into CSS or HTML to save an HTTP request.
- Decoding JWT headers and payloads to inspect their claims.
- Reading the contents of a PEM-encoded TLS certificate.
- Inspecting Authorization: Basic headers during API debugging.
Frequently asked questions
Is Base64 encryption?
Why do some Base64 strings end with one or two equals signs?
What is URL-safe Base64?
Does decoding handle non-UTF8 binary data?
Advertisement