How to URL encode a string
Short answer
Paste the text into a URL encoder and it replaces unsafe characters with %XX escapes — for example a space becomes %20. Encode individual values (not the whole URL) so delimiters like ? and & are not escaped by mistake.
What URL encoding does
A URL may only contain a limited set of characters. URL (percent) encoding replaces anything unsafe or reserved with a % followed by its hex byte value, so the data survives inside a link. See what is URL encoding for the background.
URL encode a value
- Paste the textEnter the value you want to place in a URL.
- Copy the encoded outputUnsafe characters become %XX escapes; safe ones stay as-is.
- Drop it into the URLUse it as a query value or a path segment.
name = John & Jane -> name=John%20%26%20Jane: / ? and &, which breaks it. Encode each parameter value separately so the structural delimiters stay intact.The space rule
A space becomes %20 in a path. In query strings it is often written as + instead, a legacy of HTML form encoding. When in doubt, %20 works in both places. For the full escape table, see the URL encoding reference.