Base64 Encoder
Interactive StudioEncode text to Base64 or decode Base64 back to plain text, with full Unicode support — instantly, in your browser. Instant feedback with zero server storage.
Loading tool…
About Base64 Encoder
Base64 is not encryption — it's a way of representing arbitrary binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). Every three bytes of input become four Base64 characters, which is why encoded output is always about 33% longer than the original. This tool encodes text into that format, or decodes Base64 back into the original text, using your browser's built-in TextEncoder/TextDecoder so multi-byte UTF-8 characters like emoji and accented letters round-trip correctly.
The reason Base64 exists at all is that many older text-based protocols and formats — email (MIME attachments), JSON payloads, URLs, CSS data URIs, XML — can't safely carry raw binary bytes, since control characters or non-ASCII bytes can break the parser. Base64 sidesteps that by shrinking the alphabet down to something every text channel can pass through untouched. Anyone can decode it instantly, so it should never be used to hide passwords, tokens, or anything that needs real confidentiality — for that you need actual encryption with a key.
Common uses include embedding small images directly in HTML or CSS via data URIs, encoding binary attachments for email, and packing authentication tokens (like the payload of a JWT) into a URL-safe string.
How to use Base64 Encoder
- Choose Encode or Decode.
- Paste the text or the Base64 string.
- Copy the result.
Worked examples
Input: Hello
Result: SGVsbG8=
Input: SGVsbG8=
Result: Hello
Background
Base64 represents binary data using 64 printable characters. Every three bytes become four characters, so output is about 33% larger. The = sign at the end is padding when the input length is not a multiple of three.
Base64 is encoding, not encryption. Anyone can decode it, so never use it to hide secrets. It is used to embed small images in CSS, send binary in JSON and carry credentials in HTTP Basic auth headers.
Common mistakes
- Treating Base64 as a way to protect passwords.
- Decoding a URL-safe Base64 string that uses - and _ with a decoder expecting + and /.
- Pasting a string with whitespace or missing padding and getting a decoding error.
Frequently Asked Questions
Frequently Paired With
Fast, local-first developer micro-tools with zero tracking or latency.
