U.UtilityApp
⚙️ DevFree · No signup

URL Query String Parser

Parse the parameters out of any URL or query string into clean, readable JSON — repeated keys become arrays.

From a pasted URL to JSON

Paste a full URL or just the part after the question mark. The tool takes everything after the first ?, or the whole input if there is no ?, decodes it with the browser's standard URLSearchParams, and prints the result as JSON. The sample URL https://example.com/search?q=running+shoes&size=42&color=red&color=blue&page=2 gives:

{ "q": "running shoes", "size": "42", "color": [ "red", "blue" ], "page": "2" }

Three things happen along the way. A + becomes a space. Percent codes are decoded, so %E2%82%AC becomes € and c%26d becomes c&d. A key that appears more than once turns into an array, in the order it appeared.

Values stay as text

Every value in the output is a string. size=42 is "42", not the number 42, and active=true is the text "true". That's how query strings actually arrive at a server, so it's what your code has to deal with. If a handler compares page === 2, it will fail on real requests until it converts the value.

A key with no value comes out as an empty string. ?debug&verbose=&x=1 gives "debug": "" and "verbose": "", so a check for whether a flag is present has to test for the key, not for a truthy value.

Remove the #fragment first

The tool doesn't strip the part after #. Paste https://example.com/p?id=7&ref=mail#reviews and the result shows "ref": "mail#reviews". Browsers never send the fragment to the server, so delete it before parsing if you want to see what the server receives.

Also check what you pasted when the output looks odd. A URL with no ? at all, such as https://example.com/path, is treated as a query string, so you get a single key containing the whole address and an empty value.

Brackets, semicolons and other conventions

Parsing follows the plain web standard, not any framework's extensions:

  • Brackets are part of the key. ids[]=1&ids[]=2 gives a key called ids[] holding ["1", "2"], and user[name]=Ada stays as the key user[name]. PHP and some Node libraries build nested objects from these; this tool doesn't.
  • Only & separates parameters. a=1;b=2 is one parameter whose value is 1;b=2.
  • A stray percent sign is kept. f=100% comes through as "100%" rather than causing an error.

Frequently asked questions

How do I check which UTM tags a link carries?+

Paste the whole link. Each utm_ parameter appears as its own key with the decoded value, so a campaign name like oct%20sale reads as oct sale.

Can it build a query string from JSON?+

No, it only parses in one direction. To go the other way, use URLSearchParams in your code, which also handles the encoding.

Does the order of parameters matter?+

Keys appear in the order they first occur in the URL, except that keys made only of digits, such as 2 or 10, are listed first in numeric order. Most servers ignore order, but caches and signed URLs can treat a reordered query as a different request.

Is the URL I paste sent anywhere?+

No. Parsing runs in the page, which matters when links carry session IDs, reset tokens or personal details in their parameters.

Embed this tool on your website

Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.

<iframe src="https://utilityapp.lat/embed/dev/query-string-parser" title="URL Query String Parser" width="100%" height="600" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px"><a href="https://utilityapp.lat/dev/query-string-parser">URL Query String Parser</a> by UtilityApp</p>