Why encode a URL?
A URL can only contain certain characters. Spaces, accents and symbols (&, ?, =…) must be encoded (percent-encoding, e.g. a space becomes %20) to be transmitted correctly in a link or query parameter.
encodeURIComponent or encodeURI?
This tool uses encodeURIComponent, ideal for encoding a parameter value (it also encodes &, =, ?). To keep a full URL working, use encodeURI instead.
Frequently asked questions
Does a space become %20 or +?
With standard percent-encoding, a space becomes %20. The + is specific to form encoding.
Is my data sent anywhere?
No, everything is processed in your browser.