Base64 Encode/Decode

Encode text to Base64 or decode Base64 back to text.

Result
Ready

What is this tool?


Base64 encode/decode converts between Unicode text and the ASCII alphabet used in data URLs, headers, and some JSON fields. It is encoding, not encryption.

Three bytes become four characters from A–Z, a–z, 0–9, +, / with = padding. The output is about a third longer and fully reversible. Anyone who has the string can decode it. Do not treat Base64 as a way to hide a password or a token.

This tool encodes UTF-8 text first so emoji and non-English letters survive. Decode fails on invalid alphabets, truncated input, or URL-safe Base64 that still uses a different character set. Compressed-then-encoded bytes will decode to binary, not to readable text.

Use it to inspect a data URL payload, an example from docs, or a header value. Do not paste production secrets into a tool you would not trust with the plaintext.

How to use


  1. Choose Encode (text → Base64) or Decode (Base64 → text).
  2. Paste the input.
  3. Copy the result when it looks right.

Example


Example input
hello
Example output
aGVsbG8=

Benefits


  • Round-trip Unicode text in the browser.
  • Useful for APIs, data URLs, and headers.
  • Clear errors on invalid Base64.

FAQ


Is Base64 encryption?
No. Anyone can decode it. There is no key.
Why does decoding fail?
Invalid characters, missing padding, a truncated string, or a different Base64 alphabet.
Can I encode non-English text?
Yes. Unicode is encoded as UTF-8 before Base64.
Why is the output longer than the input?
Every three bytes become four characters, so the text grows by about 33%.

Guide


Related tools