Skip to content

Text Tools

Encode and decode text

Base64, URL encoding and HTML entities, in both directions, with correct UTF-8 handling.

  • Free, no signup
  • No upload — runs on your device
  • No watermark
  • Unlimited use

Base64 Encoder

Processed locally

btoa() throws on any character above 255, which is most of the world

The browser's built-in btoa() function accepts only Latin-1 — code points 0 to 255. Feed it an emoji, a Chinese character, or the word "naïve", and it throws an InvalidCharacterError. Countless encoders on the web wrap btoa() directly and simply fail on non-English input, or worse, silently mangle it.

The correct approach is to encode the string to UTF-8 bytes first, then Base64 those bytes. That is what happens here: TextEncoder produces the byte sequence, and each byte is safely below 256 by construction. Decoding reverses it with TextDecoder. An emoji survives the round trip; so does Arabic, so does an em dash.

Worth knowing: Base64 is not encryption. It is a way to represent binary data in text-safe characters, and anyone can decode it instantly. If you are Base64-encoding a password to hide it, you have hidden nothing.

How it works

  1. Choose a mode — encode or decode
  2. Paste your text
  3. Copy the output
Why nothing uploads. Every operation on this page happens inside your browser using JavaScript and WebAssembly. Your file is read into memory, processed, and offered back as a download. It is never transmitted. Disconnect from the internet after this page loads and the tool keeps working.

Frequently asked questions

Why do other Base64 tools fail on emoji or accented characters?
Because they call the browser's btoa() directly, which only accepts characters below code point 256. This tool encodes to UTF-8 bytes first, so any character survives the round trip.
Is Base64 a form of encryption?
No. It is an encoding, fully reversible by anyone in one step. It protects nothing. Use it to make binary data safe for text channels, never to hide anything.
What is the difference between URL encoding and Base64?
URL encoding escapes characters that have meaning in a URL, leaving the rest readable. Base64 rewrites everything into a 64-character alphabet, producing text that is safe anywhere but unreadable.
When would I use HTML entity encoding?
When inserting user text into an HTML page. Encoding the angle brackets and ampersand prevents the text from being interpreted as markup, which is the core defence against cross-site scripting.
Does Base64 make my data bigger?
Yes, by about a third. Three bytes become four characters. That overhead is the cost of being safe to transmit through text-only channels.