Encode or decode text as URL (percent-encoded) text or Base64, in either direction. Handles full Unicode text correctly, with an optional URL-safe Base64 alphabet.
encodeURIComponent escapes every character that is not safe in a single URL part, including &, = and /, so it is correct for a query parameter value. encodeURI leaves characters that are structurally part of a URL, such as :/?&=, untouched, so it is meant for encoding a whole URL rather than one piece of it.
Standard Base64 uses + and /, which have special meaning inside a URL, plus = padding at the end. URL-safe Base64 (also called Base64url) replaces + with -, / with _, and drops the padding, so the result can be used directly in a URL or filename.
For Base64, the input has to be a valid Base64 string of the right length; stray characters or truncated text will fail. For URL decoding, a % must always be followed by two hex digits; text that is not actually percent-encoded will fail to decode.
Yes. Base64 encoding goes through UTF-8 bytes first, so accented letters, non-Latin scripts and emoji round-trip correctly rather than becoming garbled text.
No. Encoding and decoding use your browser's own built-in functions and run entirely on your device. Nothing is sent to a server or saved.