Why URLs Use %20 and Encoding
Special characters, Unicode, and parameters need a safe representation.
What it does and when to use it
A URL contains components with reserved meaning. Spaces, &, #, and non-ASCII characters can change interpretation if not encoded.
What information to enter
Encode a parameter value, not necessarily an entire URL. Decode trusted input and avoid double encoding.
How to understand the result
encodeURIComponent suits parameter values; whole-URL handling must preserve separators such as : and /.
Recommended step-by-step workflow
- Check the assumptionsA URL contains components with reserved meaning. Spaces, &, #, and non-ASCII characters can change interpretation if not encoded.
- Use matching unitsEncode a parameter value, not necessarily an entire URL. Decode trusted input and avoid double encoding.
- Compare with another scenarioencodeURIComponent suits parameter values; whole-URL handling must preserve separators such as : and /.
Short example
The text “hello world” becomes hello%20world inside a parameter.
Common mistakes
- Encoding an entire URL with a function that also encodes separators.
- Encoding an already encoded value and producing %2520.
Frequently Asked Questions
Why does space sometimes become +?
application/x-www-form-urlencoded commonly represents spaces with +.
Does encoding encrypt data?
No. It only changes representation and is easily reversed.
Are my personal inputs saved?
No. The calculators and guides are designed for quick browser use without storing your personal input values.