What this tool does
A query string becomes a JSON object.
?q=json+to+yaml&page=2&tag=a&tag=b
{
"q": "json to yaml",
"page": "2",
"tag": ["a", "b"]
}
+ is a space and %C3%A9 is é: the percent-encoding is decoded for you, which is usually the reason you came. A repeated key becomes an array, in the order the values appeared.
Paste the whole address
https://x.dev/search?q=ada&lang=en#results
{
"q": "ada",
"lang": "en"
}
Pasting a whole URL is what most people do, and the converter used to make a key out of everything in front of the query: https://x.dev/search?q. The result looked like data and was nonsense. The address before the first question mark is now dropped, and the fragment after it too — location.search never carries it either. That was a real defect, found while writing this page and fixed.
A question mark inside a value stays where it is: a=1?2 gives {"a": "1?2"}, because the mark that opens a query comes before the first =, not after it.
Everything is a string
?id=007&active=true&count=3
{
"id": "007",
"active": "true",
"count": "3"
}
A query string carries text. 007 is not 7, true is not a boolean, and a converter that guessed would quietly rewrite an identifier. The typing belongs on your side, where you know that count is a number and id is a reference with its zeros.
What is left alone
- Bracket keys.
a[]=1ando[b]=2keepa[]ando[b]as their names. PHP and Rails read them as arrays and objects; other stacks do not, and the string itself does not say which wrote it. - The order of keys. They come out as they went in, first occurrence first.
- Empty values.
?a&b=gives{"a": "", "b": ""}— a parameter with no value is present, and that is often what it means.
Private by design
Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.