A web address may only contain a limited set of characters. Spaces, ampersands, question marks, accented letters and many others have to be written as a percent sign followed by two hexadecimal digits. Without that, a search term containing & splits into two parameters and a link with a space breaks when it is pasted into an email.
Steps
- Open URL encoder / decoder.
- Choose Encode or Decode.
- Type or paste the text and copy the result.
Encode one value, not the whole address
Encode mode treats the input as a single value and escapes every character that has a special meaning in a URL, including the colon, slash, question mark and ampersand. That is right for one parameter value:
- fish & chips? becomes fish%20%26%20chips%3F
- café 100% becomes caf%C3%A9%20100%25
It is wrong for a complete link. https://example.com/a b turns into https%3A%2F%2Fexample.com%2Fa%20b, which no browser will open. Build the address from its parts: keep the scheme, host and separators as they are and encode only the values you insert between them. Letters, digits and the characters - _ . ! ~ * ' ( ) are left unchanged.
Decoding
Decode mode turns percent sequences back into characters and also converts every plus sign into a space, because HTML forms encode spaces that way. So rock+%26+roll becomes rock & roll. If your text contains a real plus sign that must survive, it has to be written as %2B before decoding.
The message "This text cannot be decoded." means a percent sign is not followed by two valid hexadecimal digits, or the bytes do not form valid UTF-8. A lone % in ordinary text, as in 100%, is the common cause.
Related tools
To see all the parameters of a long link at once, already decoded, use URL parser. To turn a title into a clean address part with hyphens, use Slug generator. For text that goes into a web page and not into an address, the right escaping is done by HTML entity encoder.