Query String Parser
Split the query string of a URL into its names and values, decoded, with repeated names shown together.
Query string parser
Paste a full URL, or just the part after the question mark.
Result
5
Parameters
https://www.mystore.com/shop
Address before the ?
Names and values
| # | Name | Value |
|---|---|---|
| 1 | utm_source | news |
| 2 | color | red |
| 3 | color | blue |
| 4 | q | café au lait |
| 5 | empty |
As JSON
{
"utm_source": "news",
"color": [
"red",
"blue"
],
"q": "café au lait",
"empty": ""
}Private: Everything runs in this page. Nothing you type is sent anywhere or saved.
On this page
Query string examples
| Input | Names and values |
|---|---|
| a=1&b=2 | a="1", b="2" |
| ?x=a%20b&y=c+d | x="a b", y="c d" |
| https://x.test/p?k=1&k=2 | k="1", k="2" |
| flag&on=1 | flag="", on="1" |
| q=caf%C3%A9 | q="café" |
Formula
query = name=value pairs joined by &; %XX is one UTF-8 byte; + means a space
How the query string parser works
- Step onePaste a URL or only the query string.
- Step twoRead the list of names and values. Percent codes such as %20 and plus signs are decoded.
- Step threeCopy the JSON if you need the data in code.
What this tool does not do
- It does not fetch the URL or check that it works.
- It splits on & only; some old systems use a semicolon, which is not split.
- It does not know what a parameter means.
Frequently asked questions
How are repeated names shown?
Each occurrence is listed in the table in order. The JSON groups them into a list under one name.
What happens to the part after the #?
It is the fragment. It is never part of the query, so it is left out of the list.
Why is a value left as typed?
If a % is not followed by two hex digits or the bytes are not valid UTF-8, the value cannot be decoded, so it is kept as it was and the note says how many.