Base64 Encode/Decode

Max 1 MB · Processes automatically as you type

Processed entirely in your browser — nothing is sent to a server.

Base64 is a way of representing arbitrary binary or text data using only plain ASCII characters — an alphabet of 64 symbols (AZ, az, 09, +, /). It exists because many text-only formats (JSON, URLs, email, older config files) can’t safely carry raw binary bytes, but can carry any printable ASCII string without corruption. Encoding data as Base64 trades roughly 33% more size for guaranteed safe transport through those formats.

Encode mode takes plain text, converts it to its UTF-8 byte representation, and maps those bytes to the Base64 alphabet. Decode mode reverses the process: the Base64 string is decoded back into raw bytes, and those bytes are then interpreted as UTF-8 text to produce readable output.

That explicit UTF-8 step is the detail that makes this tool reliable for anything beyond plain English text. The browser’s native btoa() and atob() functions only support single-byte Latin-1 characters directly, so applying them straight to arbitrary text corrupts accented letters, non-Latin scripts, and emoji. Converting to and from UTF-8 bytes explicitly, before touching Base64, is what makes those characters round-trip correctly instead of turning into garbled output or throwing an exception partway through.

Invalid input is handled explicitly rather than silently: if Decode mode receives text that isn’t valid Base64 — wrong padding, stray whitespace, characters outside the Base64 alphabet — or valid Base64 that decodes to bytes that aren’t valid UTF-8, an error message is shown instead of a corrupted result. All of this runs locally, capped at 1 MB of input, with nothing sent anywhere.

Examples

Frequently asked questions

Is my data sent to a server?
No. Encoding and decoding run entirely in your browser using JavaScript. No data leaves your device.
Does this handle emoji and accented characters correctly?
Yes. Text is converted to UTF-8 bytes before encoding, and decoded bytes are interpreted as UTF-8 before being displayed, so characters outside the basic Latin alphabet round-trip correctly.
Why does Decode mode show an error?
The input is not valid Base64 — check for missing padding, extra whitespace, or characters outside the Base64 alphabet. An error is also shown if the input is valid Base64 but decodes to bytes that aren’t valid UTF-8 text.
What is the maximum input size?
1 MB. This covers typical text and small file use cases such as embedding data in JSON or a data: URI.