How it works
Encoding: text → UTF-8 bytes (via TextEncoder) → btoa → optional URL-safe substitution. Decoding reverses the process. All in your browser.
FAQ
What is URL-safe Base64? Standard Base64 uses + and / which are problematic inside URLs. RFC 4648 §5 defines a variant using - and _ instead, and drops trailing = padding. Use this for JWTs, query parameters, and anywhere the value rides inside a URL.
Does it handle emoji and non-ASCII characters? Yes. We encode the input as UTF-8 bytes via TextEncoder before applying Base64, so emoji, Korean, Japanese, accented Latin, etc. all round-trip correctly. The naive btoa() in JavaScript would throw on these.
Is my text sent anywhere? No. Encoding and decoding happen via window.btoa / window.atob in your browser. No network call.