Lotamyst / Everyday Tools / Base64 Encoder & Decoder

Base64 Encoder & Decoder

Encode and decode Base64 with full UTF-8 support — emoji and accents included. Nothing is uploaded.

Plain text
Result
File to Base64 / data URI

Files are read with FileReader in your browser. They are never uploaded — pick anything, including private documents.

All encoding and decoding happens on this page. Nothing you paste or open is sent anywhere, logged, or stored.

What it does

About this tool

Base64 exists so binary data can travel through channels that only accept text — email attachments, JSON payloads, CSS url() values, URLs. Three bytes in become four characters out, which is why an encoded string is always about 33% larger than the original.

Most quick Base64 encoders call the browser's btoa() straight on your text. That function only understands Latin-1, so it throws on any character above U+00FF and mangles multi-byte scripts. This one converts to UTF-8 bytes first, so what you paste is what you get back.

Base64 is not encryption. It is trivially reversible by anyone — it hides nothing. If you need to protect something, you need a cipher, not an encoding.

FAQ

Is my data uploaded anywhere?

No. Encoding and decoding run in your browser with JavaScript, and files you drop in are read locally. Nothing is sent to a server, so it's safe for private or work data.

Does it handle emoji and accented characters?

Yes. Text is converted to UTF-8 bytes before encoding, so emoji, accents and every non-Latin script round-trip correctly. Naive Base64 encoders that call btoa() directly fail on anything above U+00FF.

What is URL-safe Base64?

Standard Base64 uses + and /, which have meaning inside URLs. URL-safe Base64 (RFC 4648 §5) replaces them with - and _ and usually drops the = padding, so the result can go in a query string or a JWT without escaping. The decoder here accepts both forms.

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it instantly. It exists to carry binary data through text-only channels such as email, JSON and URLs. Never use it to protect a secret.

Why did my decode fail?

Either the string isn't valid Base64 (a stray character, or a length that can't be padded), or it decodes to bytes that aren't valid UTF-8 text — which happens when the original was an image or another binary file rather than text.

Related tools