Dev Tools Online

URL encoder and decoder

Paste text or a URL.

Component or full URL

Use component mode for a single query value, since it also encodes / ? & = and #. Use full URL mode to keep the URL structure intact.

Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves reserved URL characters such as / ? & = alone. encodeURIComponent encodes them so the text is safe inside one query parameter.