2026-05-25 · 4 min read
URLs reserve certain characters. Spaces, ampersands, and Unicode in query values must be percent-encoded. Double-encoding or encoding an entire URL breaks routing and analytics.
Encode per component
Encode the query value hello world as hello%20world, not the full URL. The scheme (https://) and host must remain unencoded.
Plus vs %20
HTML form submissions historically used + for spaces in application/x-www-form-urlencoded bodies. In path segments, %20 is standard. Know which context your framework expects.