Base64 Encoder / Decoder
Convert UTF-8 text to Base64 and back without leaving the page. Encoding uses the browser text encoder, so accented characters, Vietnamese diacritics and emoji round-trip correctly instead of breaking like raw btoa calls.
Standard Base64 only. Limit 1 MiB. Non-ASCII text is encoded as UTF-8 first.
How it works
- Choose Encode or Decode.
- Paste text. Encode treats input as UTF-8; Decode expects standard Base64 with correct padding.
- Copy the output, download it as a text file, or swap input and output to reverse the operation.
Supported input and limits
| Input | UTF-8 text, Base64 text |
|---|---|
| Output | Base64 text, UTF-8 text |
| Size limit | 1 MiB |
| Offline | Verified after the page and its script are cached |
- Standard Base64 alphabet only; URL-safe variants are rejected.
- Decoded bytes must be valid UTF-8.
- Maximum input is 1 MiB of text.
Privacy
This tool runs entirely in your browser. Your input is processed in memory and is not uploaded, logged or stored by TinkerFern. There is no account, no server-side processing and no analytics payload containing your content.
Client-side processing reduces data transfer, but it does not protect against bugs in your browser or in a file you choose to open. Keep backups of important files.
Frequently asked questions
Why does btoa fail on accented text?
btoa only accepts Latin-1 code units. This tool first encodes text to UTF-8 bytes with TextEncoder and then converts those bytes to Base64, which is why Unicode survives the round trip.
Which Base64 variants are accepted?
Standard Base64 with the +/ alphabet and = padding. URL-safe Base64 (- and _) and missing padding are rejected with a clear message so decoded output is never silently wrong.
Can I decode binary files?
This version is text-oriented and decodes to UTF-8 with fatal validation. Binary decoding is out of scope because displaying arbitrary bytes as text would produce misleading output.
Related tools
Continue with a task that often follows this one.