Encoder and Decoder
Convert text to and from Base64, Base64url, URL percent-encoding and HTML entities, with correct handling of non-ASCII characters.
Output updates as you type.
Output
Why non-ASCII text needs care
The browser's built-in btoa only accepts characters in the
0 to 255 range, so it throws on anything outside Latin-1. This tool runs text
through TextEncoder first, so it Base64-encodes the UTF-8 bytes,
which is what every other tool and language means by Base64 of a string.
Decoding reverses it through TextDecoder.
Base64url swaps + for - and / for
_ and drops the = padding, which is the form used in
JWTs and in URL path segments. Decoding accepts either form.