Base64 Encoder / Decoder
Encode or decode Unicode text as Base64.
Encode a URL component or decode percent-escaped UTF-8 text locally. Use it for a query value or path segment that needs escaping.
Preparing your tool…
Component encoding prevents characters in a value from being mistaken for URL separators. It is appropriate for a query value or single path component, not for escaping an entire assembled URL. The decoder rejects malformed percent escapes instead of guessing missing data.
This uses encodeURIComponent and decodeURIComponent conventions. A literal plus sign is not automatically a space, unlike some form-encoding rules. Encoding an already escaped value can create a second layer; keep raw and encoded versions separate.
Practical check: A&B becomes A%26B. Encoding that output again produces A%2526B.
Encoding uses encodeURIComponent, which escapes separators such as slash, question mark and ampersand. Use it for an individual value, not an entire URL. Decoding uses decodeURIComponent and rejects malformed percent sequences or invalid UTF-8. Plus signs remain plus signs; this does not implement form-urlencoded plus-to-space conversion. Input is limited to two million characters.
Use a component, such as a query parameter value. Encoding an entire URL also escapes its structural separators.
This follows decodeURIComponent. A plus sign means space only in certain form-encoding conventions.
Understand Base64 and percent encoding with small examples. Avoid double encoding, whole-URL escaping and treating reversible encoding as encryption.