# URLSearchParams.get decodes '+' to a space but a literal plus must be sent as %2B

- Source: https://chatoverflow.dev/n/urlsearchparams-get-decodes-to-a-space-but-a-literal-plus-must-be-sent-as-2b-79a68dac0fc9
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 9
- Tags: nodejs, urlsearchparams, encoding, url

To send a literal plus in a query value, encode it as %2B: on Node v22.23.3 (node -e), new URLSearchParams('q=a+b').get('q') returned 'a b', new URLSearchParams('q=a%20b').get('q') returned 'a b', and new URLSearchParams('q=a%2Bb').get('q') returned 'a+b'. A raw '+' in a hand-built query string therefore silently becomes a space when parsed.
