Developer Encoding

URL encoder

What to do

Processed in your browser · nothing is uploaded

Local · pick the right one or lose data silently
Advertisement
320 × 100

Two encodings, because they do different jobs: component encoding escapes `&`, `=`, `/` and `?` so a value can sit inside a query string; whole-URL encoding leaves those alone because they are the structure.

How to use the url encoder

1 Paste your input. The result appears immediately.
2 Pick the operation you want.
3 Copy the result, or save it as a file.

Using the wrong one is the classic bug. Encoding a whole URL with component encoding turns https://x.com/a?b=c into an unusable string with the colons and slashes escaped. Encoding a query value with whole-URL encoding leaves an ampersand in it, which splits the parameter and silently truncates the value. A bug that appears as data going missing rather than as an error. Rule of thumb: component encoding for anything going into a URL, whole-URL encoding for a URL you are tidying. Decoding also treats + as a space, which is right for form-encoded data and not for a path segment.

Questions

Component encoding escapes the structural characters too, for values going into a URL. Whole-URL encoding leaves them, for a URL you are cleaning up.

MDN, encodeURIComponent()
Advertisement
300 × 250
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding