Blog · 2026-03-18

URL encoding: query strings, forms, and plus-sign gotchas

Why `+` and `%20` disagree, how `encodeURIComponent` differs from form rules, and how to debug bad links quickly.

urlhttpencoding

Component vs form encoding

`encodeURIComponent` is the right default for query parameter values. HTML forms application/x-www-form-urlencoded historically treats spaces as `+`, which surprises people pasting URLs between systems.

Round-trip checks

After encoding, decode once in a trusted tool to confirm you did not double-encode percent sequences — a common bug when stitching marketing UTM tags by hand.

Try these tools next

Back to all tools or browse the blog index.