Moayyad Faris
JSON and Data

Processed locally in your browser — not uploaded

Base64 Encoder / Decoder

Encode text to base64 or decode base64 back to text. Properly handles UTF-8 — Arabic, emoji and other non-ASCII text round-trip correctly, unlike a plain btoa()/atob() call. Runs entirely in your browser.

Output will appear here
01

How to use

  1. Choose Encode or Decode.
  2. Paste text (for encoding) or a base64 string (for decoding) — the output updates live.
  3. Encoding fully supports UTF-8, so Arabic, emoji and other non-ASCII text round-trip correctly.
02

Understanding the output

This goes through TextEncoder/TextDecoder rather than using the browser's btoa()/atob() directly on raw text — those only handle single-byte (Latin1) characters, so anything outside that range (most non-English text, emoji) would throw an error or silently corrupt.

03

Common issues & tips

  • "Not valid base64": the input has characters outside the base64 alphabet (A-Z, a-z, 0-9, +, /, =) or incorrect padding.
  • Decodes to garbled text: the base64 may encode binary data (like an image) rather than UTF-8 text, which this tool doesn't attempt to render.

Frequently asked questions

Does this handle non-English text and emoji correctly?
Yes. It encodes through UTF-8 first, so Arabic, Chinese, emoji and any other Unicode text round-trips correctly — the browser's raw btoa()/atob() functions only handle single-byte Latin1 text and would throw or corrupt on anything else.
Why did decoding fail?
Either the input isn't valid base64 (wrong characters or padding), or it decodes to bytes that aren't valid UTF-8 text — for example, base64 of an image or other binary data.
Is my text sent to a server?
No. Encoding and decoding both happen entirely in your browser.

Related tools