SummaryLog

Base64 Encoder / Decoder

Encode and decode Base64 strings with full UTF-8 support.

0 bytes
0 bytes

Base64 is a way of representing binary or text data using only 64 safe ASCII characters, so it can travel through systems that expect plain text, such as JSON payloads, data URIs, email attachments, and HTTP basic-auth headers. This tool converts your text to a Base64 string and back again, entirely inside your browser.

Reach for it when you need to embed an image or token in a config file, debug an API response, or check what an encoded string actually contains. It handles full UTF-8, so emoji and non-Latin scripts like Korean or Japanese round-trip correctly, and it shows the byte size of both input and output so you can see the size overhead.

How to use

  1. Paste or type your content into the Input box. The byte counter updates as you type.
  2. Click Encode to turn plain text into a Base64 string, or Decode to turn a Base64 string back into readable text.
  3. When decoding, leading and trailing whitespace is trimmed automatically, so pasting from logs or emails is fine.
  4. Read the result in the Output box and check its byte size next to the label.
  5. Click Copy to put the output on your clipboard for use elsewhere.

FAQ

Is my data uploaded to a server?
No. Encoding and decoding run completely in your browser using the standard btoa/atob APIs plus a TextEncoder for UTF-8. Your text never leaves your device, so it is safe for tokens and private content.
Does it handle emoji and non-English characters?
Yes. The tool encodes text as UTF-8 before Base64, so emoji, Korean, Japanese, and other multi-byte characters are preserved exactly when you decode them back.
Why is my Base64 output longer than the input?
Base64 represents every 3 bytes with 4 characters, so the encoded string is about 33% larger than the original. The byte counters next to Input and Output let you see this overhead directly.
I get an "Invalid Base64 string" error when decoding. Why?
Decoding fails if the string contains characters outside the Base64 alphabet (A-Z, a-z, 0-9, +, /, =) or has incorrect padding. Make sure you copied the full string and that you are decoding Base64 rather than a URL-safe variant.
Is this URL-safe Base64?
No, it uses standard Base64 with + and / characters. URL-safe Base64 replaces those with - and _; if you need that variant, swap the characters after encoding.