URL Encoder / Decoder
Percent-encode or decode URLs and query strings.
Loading…
About URL Encoder / Decoder
One ampersand or equals sign inside a query value can split a parameter in two, and a stray space can break a link. Paste the value and this page percent-encodes it with encodeURIComponent, so reserved characters such as & = ? # / and spaces become %XX sequences and non-ASCII letters are written as their UTF-8 bytes. Switch to Decode to turn those sequences back into readable text. It is built for single values, not complete addresses.
Features
- Encodes with encodeURIComponent, escaping & = ? # / and spaces
- Non-ASCII text becomes UTF-8 percent sequences
- Decodes %XX sequences back to readable text
- Reports malformed percent sequences instead of guessing
- Swaps the output back into the input for round-trip checks
Limitations
- Encode values only: a complete address is escaped everywhere, so https://example.com/a becomes https%3A%2F%2Fexample.com%2Fa and no longer works as a link.
- A plus sign is not read as a space when decoding, so form-encoded strings that use + keep their plus signs.
- Text with an unpaired surrogate, such as half of an emoji, cannot be encoded and gives an error.
How it works
- Choose Encode or Decode with the toggle at the top.
- Paste the text, or the percent-encoded string, into the input box.
- Read the result in the Output panel, which updates shortly after you stop typing.
- Copy the output, or choose Use output as input to switch direction and confirm it round-trips.
Example input
https://example.com/search?q=hello world&lang=enFrequently asked questions
- Encode each value on its own and join them with ? & and = yourself. Running a full address through this page also escapes the colon and slashes in the scheme and path, which breaks the link.
- Decoding follows encodeURIComponent, which only knows percent sequences, so %20 becomes a space but + stays a plus. If your data came from an HTML form that writes spaces as +, replace them before decoding.
- A % must be followed by two hex digits, and the resulting bytes must form valid UTF-8. A literal percent sign in ordinary text, or a cut-off sequence like %E4%B8, triggers the error. Write a real percent sign as %25.
- Letters, digits and the marks - _ . ! ~ * ' ( ) pass through as they are. Everything else, including spaces, quotes, brackets and non-ASCII characters, is replaced by %XX sequences.
- No. The conversion uses your browser's built-in functions on the page, and nothing is transmitted. The tool has no download button, so nothing here needs an account.
