URL Encoder/Decoder
Switch between encoding a value for a query parameter and encoding a full URL, or decode either back to plain text.
Overview
URLs can only safely contain a limited set of characters — spaces, ampersands, and other reserved characters have to be percent-encoded before they can appear in a query string or path. This tool covers both encoding needs: component encoding (via encodeURIComponent) for a single value going into a query parameter, and full-URI encoding (via encodeURI) for an entire URL, which leaves characters like /, :, and ? untouched since they're structurally meaningful at the URL level rather than inside one value.
Mixing these two up is a common source of bugs — encoding a whole URL with the component function turns every / into %2F and breaks it, while encoding just a parameter value with the URI function leaves characters like & and = unescaped and lets them corrupt the query string. This tool makes the distinction explicit instead of leaving it to guesswork.
Examples
Encoding a query value
hello world & more
hello%20world%20%26%20more
Decoding a query value
hello%20world%20%26%20more
hello world & more
How It Works
- Paste the text or URL you want to convert into the input box.
- Choose Encode or Decode.
- Choose Component (for a single value going into a query parameter) or Full URI (for an entire URL).
- Click Convert to see the result.
Use Cases
Building a query parameter by hand
Encode a value containing spaces, ampersands, or other special characters before appending it to a URL's query string.
Debugging a broken redirect URL
Decode a percent-encoded URL to read its actual, human-readable value and confirm it points where you expect.
Tips
- Full-URI encoding deliberately leaves /, :, ?, #, and & unescaped, since they're structural characters in a URL, not part of the encoded content.
- Use Component mode for a single query parameter value; use Full URI mode only when encoding an entire URL string.
FAQ
No. Encoding and decoding happen entirely in your browser using JavaScript's built-in encodeURIComponent/decodeURIComponent and encodeURI/decodeURI functions.
Component mode escapes every reserved character, including /, ?, and &, which is correct for a single value being placed inside a query parameter. Full URI mode leaves those characters unescaped since they're structurally part of a URL, which is correct when encoding an entire URL rather than one value.
The tool shows an error message instead of guessing — a lone % or an incomplete escape sequence isn't valid percent-encoding and can't be decoded.