URL Encoder / Decoder
Encode or decode URL components using encodeURIComponent / decodeURIComponent.
What URL encoding is and why it matters
URLs can only safely contain a limited set of characters. Spaces, accented letters, ampersands, slashes inside a value, and many symbols have to be percent-encoded, which means replacing them with a percent sign followed by their hexadecimal byte value, for example a space becomes %20. This tool encodes and decodes those values so query strings, path segments, and form data stay valid and unambiguous.
It is useful for developers building API requests, anyone debugging a link that contains odd %XX sequences, and people who need to safely embed user-supplied text such as search terms into a URL.
How to use it
Choose the Encode or Decode tab at the top. In Encode mode, type or paste the raw text you want to make URL-safe, then click the button to produce the percent-encoded version. In Decode mode, paste an encoded string and the tool turns the %XX sequences back into readable characters.
Use the Copy button to grab the result for pasting into your code, browser, or API client. Switching tabs clears the fields so you always start from a clean slate.
How it works under the hood
Encoding uses the standard JavaScript encodeURIComponent function, and decoding uses decodeURIComponent. This means it encodes a value as a single URL component, so reserved characters such as the ampersand, equals sign, question mark, and slash are all escaped. That is the correct behaviour when you are inserting a value into one part of a URL, such as a single query parameter.
If you paste a malformed encoded string, for example a lone percent sign that is not followed by two valid hex digits, decoding will fail and the tool shows a clear error message rather than producing garbage output.