Base64 Encode & Decode

Paste text into the input box, then Encode to produce Base64, or Decode to recover the original string. Encoding handles Unicode via UTF-8; decoding rejects broken payloads with a clear Invalid Base64 message.

Updated 2026-08-03 · developer

About this tool

This utility exposes a multiline Input field plus Encode and Decode actions. Encode runs btoa after UTF-8-safe preparation so non-ASCII characters survive. Decode reverses that path with atob; if the string is not valid Base64, the result shows Invalid Base64 instead of crashing.

How to use

  1. Paste your text: Put plain text or a Base64 string into the Input textarea.
  2. Encode to Base64: Click Encode to turn readable text into a Base64 string in the result area.
  3. Decode from Base64: Click Decode when the input is Base64; valid data returns the original text.
  4. Fix invalid input: If decoding fails, the result shows Invalid Base64—correct the string and try again.

Common use cases

Tips

FAQ

Will non-English characters encode correctly?

Yes. Encoding prepares UTF-8 before Base64 so accented and CJK characters are preserved.

What does Invalid Base64 mean?

The Decode path could not parse the input with atob—check for typos, missing padding, or non-Base64 characters.

Do Encode and Decode run on a server?

Both buttons process the textarea content in your browser session.

Can I encode empty text?

Yes. Encoding an empty string yields an empty Base64 result; decoding empty input may also yield empty output.

Related keywords

Related tools