Skip to content
nah

Base64 Encoder / Decoder

Encode or decode Base64 for text and files — UTF-8 safe, URL-safe option, fully in-browser.

100% in your browser. Nothing is uploaded.

Base64 output

Output appears here.

Encode a file

Frequently asked questions

Is my data uploaded anywhere?

No. All encoding and decoding runs entirely in your browser using built-in JavaScript APIs. Nothing leaves your device.

What is URL-safe Base64?

Standard Base64 uses + and / characters that have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, and strips = padding — making the output safe to include in query strings and path segments without further escaping.

Why does naive btoa() break on non-ASCII text?

btoa() only handles Latin-1 (byte values 0–255). Multi-byte UTF-8 characters like emoji or CJK glyphs have code points above 255, which throws. This tool first encodes text to a UTF-8 byte array, then Base64-encodes those bytes — so any Unicode string works correctly.

More dev tools