URL Encode
Type or paste text to percent-encode it for use in a URL path, query parameter or form field. Letters, digits and - . _ ~ are kept; everything else becomes %XX.
Tip: press Ctrl + Enter (⌘ + Enter on Mac) to encode.
What is URL encoding?
URL encoding replaces spaces, accented letters and special characters with codes that start with %, so the text can be used safely inside a link. For example, cats & dogs becomes cats%20%26%20dogs.
When do you need it?
Whenever you put your own text into a link – a search word, a file name or a value after ?. Characters like &, ?, = and # have a special meaning in links, so without encoding they would break the link or cut your text short.
Examples
| Text | Encoded |
|---|---|
| hello world | hello%20world |
| café crème | caf%C3%A9%20cr%C3%A8me |
| a&b=c/d? | a%26b%3Dc%2Fd%3F |
Frequently asked questions
Should spaces become %20 or +?
Use %20 (the default) – it works everywhere. Choose Encode spaces as + only if the website or system you send the data to asks for form-style encoding.
Should I encode the whole link or only part of it?
Usually only the part you add. To search for cats & dogs on https://example.com/search?q=, encode just cats & dogs and put the result at the end. If you encode the whole link, https:// turns into https%3A%2F%2F and the browser can no longer open it.
Which characters stay the same?
Only the letters A–Z and a–z, the digits 0–9 and the four symbols - . _ ~. Everything else, including spaces and accented letters, is converted to % codes.