URL Encoder and Decoder

Percent-encode text for a URL, or decode a percent-encoded string back to plain text.

Result

How to use it

  1. Choose Encode or Decode.
  2. Paste your text. With Live mode on, the result updates as you type.
  3. Copy the result, or use Swap to move it back into the input.

Reserved characters such as / ? # & = : and @ are encoded, so encode a single value, not a full URL, or the URL will break.

Common characters after encoding

CharacterEncodedNote
Space%20Not +
&%26Separates query parameters
=%3DSeparates a key from its value
/%2FPath separator
?%3FStarts the query string
#%23Starts the fragment
--Left unchanged

Frequently Asked Questions

Which function does the tool use?
encodeURIComponent to encode and decodeURIComponent to decode. This is the right choice for a query value or path segment, not for a whole URL.
Which characters stay unchanged?
Letters A to Z and a to z, digits 0 to 9, and the symbols - _ . ! ~ * ' ( ). Everything else is converted to %XX byte codes, UTF-8 encoded.
How is a space encoded?
As %20, not +. The + form belongs to HTML form encoding and is not produced here.
Why does decoding fail?
The input contains a % that is not followed by two hex digits, or the bytes are not valid UTF-8. The tool shows an error instead of output.
What does Process lines separately do?
It encodes or decodes each line on its own and keeps the line breaks, which is useful for lists of values.
Is my text sent to a server?
No. Encoding and decoding run in your browser.

TechBasket Tools

Published