Base64 encode or decode

Convert text to Base64 or Base64 back to text, with UTF-8 handling so emoji and non-ASCII characters round-trip cleanly.

Drop your file here

or click to browse

All files • or paste with ⌘V

How it works

Convert text to Base64 or Base64 back to text, with UTF-8 handling so emoji and non-ASCII characters round-trip cleanly.

Type or paste into the input box and the encoded / decoded result appears live. Mode toggles between encode (text to Base64) and decode (Base64 to text). The implementation wraps btoa / atob in encodeURIComponent / decodeURIComponent so multi-byte UTF-8 sequences (accents, emoji, CJK) survive the round-trip; a naive btoa on a UTF-8 string fails on non-ASCII input. Bad Base64 input shows an inline error. The copy button puts the output on your clipboard. Use cases: stuffing JSON into a URL parameter, decoding a data: URI, inspecting basic-auth headers, embedding a small image in CSS. For Base64 of files (images, binaries), look for tools that handle binary data directly.

How to use it

  1. Pick encode or decode. Toggle between text-to-Base64 and Base64-to-text.
  2. Paste your input. The result appears live as you type; bad Base64 shows an inline error.
  3. Copy the output. One click puts the result on your clipboard — nothing ever touches a server.

Frequently asked questions

Why does my decoded Base64 have garbled characters?
Usually a UTF-8 issue. This tool handles UTF-8 input cleanly; if you're getting garbled text, the original Base64 may not have been encoded as UTF-8.
Can I encode a file to Base64?
Not directly here — this tool is for text. Use the Image to Base64 tool on this site for JPG, PNG, WebP, GIF, or SVG files.
Is the data uploaded?
No. Encoding and decoding happen entirely in your browser, no network involved.
Is the output URL-safe?
It's standard Base64 (with + and /). For URL-safe Base64 (- and _), you'd need to substitute manually.
Saved