Query-string parser and builder
Paste a URL or a bare query string to break it into key-value pairs, repeated keys
included — or build one from a list of pairs. Uses the browser's own
URLSearchParams, not a hand-written parser. Runs entirely in your browser.
One pair per line, key=value. A line with no = is treated as a key with an empty value. Repeat a key on multiple lines to produce a repeated-key query string.
| # | Key | Decoded value | Raw (encoded) |
|---|---|---|---|
| Nothing to show yet. | |||
About this tool
Paste a full URL or just the query-string part, with or without a leading ?, and it is broken into every key-value pair, in the order they appear, with repeated keys kept as separate rows rather than the later one silently overwriting the earlier. Or switch to Build, list pairs one per line, and get a properly encoded query string — and a full URL, if you give it a base to attach to.
How it works
Both directions run entirely on the browser's own URLSearchParams — nothing here is a hand-written parser or encoder. Pasted input is first checked for a ?: everything before it is treated as a base URL (and discarded for parsing purposes, but shown in Notes), everything from the ? up to any # fragment is the query string that actually gets parsed.
+ means space, not %20. URLSearchParams follows the application/x-www-form-urlencoded convention every HTML form actually submits with: a literal space becomes + in the encoded output, and both + and %20 decode back to a space on the way in. If you specifically need %20-style percent-encoding instead — for a URL path segment rather than a form-style query string — that is a different encoding target; see the URL encode and decode tool, which handles exactly that distinction.
Only & separates pairs. Some much older tools and frameworks also accepted ; as a pair separator (an early, since-abandoned W3C recommendation) — URLSearchParams, and this page, do not; a stray ; is treated as part of a value, not a separator.
Common questions
Why do I see the same key twice in the table?
Because it appeared twice in the input. a=1&a=2 is a legitimate way to send a list — many server frameworks read it as an array. This page shows every occurrence rather than collapsing them, since collapsing would silently discard data.
What about PHP/Rails-style foo[]=1&foo[]=2?
That square-bracket convention is a server-framework convention for interpreting repeated keys as an array, not a URL-syntax feature — as far as the URL itself is concerned, foo[] is simply a literal key name containing two extra characters. This page parses it exactly like any other key; it does not strip the brackets or infer an array structure that the URL spec itself has no concept of.
Why did my space turn into a + in the output?
That's correct, not a bug — see "How it works" above.
Known limitations
Base URL parsingThe part before?is treated as plain text, not validated as a well-formed URL — this tool's job is the query string, not general URL validation.Nested/bracket array syntaxNot interpreted structurally — see "Common questions" above.
More tools
See the whole toolbox — thirty-seven free tools planned, all running in your browser.