Encode text or files to Base64, or decode Base64 strings back to plain text.
Powered by Ubikon Technologies | All encoding and decoding happens in your browser. No data is sent to any server.
Base64 is a text encoding for binary data. "Encode" takes the plain text (or an uploaded file, up to 5MB) and turns it into a Base64 string using the browser's built-in btoa() function; "Decode" reverses that with atob(). Text is widened to UTF-8 bytes first so non-ASCII characters decode back correctly instead of turning into mangled symbols.
Plain text input
Hello World
After clicking "Encode"
SGVsbG8gV29ybGQ=
What does Base64 encoding actually do?
It converts bytes into a text string using only 64 printable characters (A–Z, a–z, 0–9, +, /), which is why binary data such as images can be embedded safely in places that only accept text, like JSON or a data: URL. This tool encodes with the browser's btoa() (after widening to UTF-8 so multi-byte text round-trips correctly) and decodes with atob().
Can I encode a file, not just text?
Yes — click "Upload File" or drag a file onto the tool. It is read with the FileReader API as a data URL, and the Base64 portion after the comma is extracted and shown in the Base64 panel. The file size limit is 5MB.
Why did decoding fail with an error?
The Decode button requires the input to be valid Base64 — if it contains characters outside the Base64 alphabet or has incorrect padding, atob() throws and the tool shows "Invalid Base64 string. Please check your input."
Is my text or file uploaded to a server?
No. Encoding and decoding both run with built-in browser functions (btoa/atob and FileReader) entirely on your device — nothing is sent anywhere.