Query String Parser

Paste a URL query string to parse it into pairs.

How it is calculated

Paste only the part of the URL after the question mark; a single leading ? is removed for you. The text is split at every & and every ; into pairs. Each pair is split at its first =: the left side is the key and the rest is the value, so c=x=y gives key c and value x=y. Both parts are URL-decoded: %20 and + become a space, and %42-style codes become the matching character. A pair with no = is kept as a key with an empty value. The output lists one key = value line per pair, the number of pairs, and Yes or No for duplicate key names. The tool does not strip a full URL or a #fragment, and it does not merge repeated keys. Names like a[] repeated twice count as duplicates.

Worked example

Paste ?utm_source=email&q=red%20shoes+size%2042&page=2&page=3&flag. After the leading question mark is removed, the tool finds 5 params. The lines are: utm_source = email; q = red shoes size 42 (the %20 and the + both became spaces, and in size%2042 the code %20 is the space before the plain digits 42); page = 2; page = 3; and flag = with an empty value. Duplicates: Yes, because page appears twice.

Try this example →

Common mistakes

  • Pasting a whole URL such as https://site.com/p?a=1. The tool only removes a leading ?, so the address becomes part of the first key. Paste from the question mark onward.
  • Leaving a #fragment at the end. It is not removed and becomes part of the last value.
  • Assuming a duplicate warning means an error. Repeated keys are valid and often intended, for example with checkboxes; they just need handling in your code.
  • Expecting a plus sign to stay a plus. In a query string it is decoded as a space, so a real plus must be sent as %2B.
  • Expecting nested data such as a[b]=1 to be turned into an object. The key is shown as the literal text a[b].

About this calculator

A URL’s query string — everything after the “?” — carries key/value pairs separated by “&”, such as ?utm_source=email&page=2, and each value may be URL-encoded (spaces as %20 or +, special characters as percent-escapes) so it survives being embedded in a link. Parsing it means decoding those pairs back into readable key/value data.

Web developers use a parser like this constantly for debugging API requests, inspecting marketing UTM parameters, or checking what data a form actually submitted, and it also surfaces a common bug source: duplicate parameter names, which different frameworks handle inconsistently (keeping the first, the last, or turning it into an array). This tool parses a pasted query string into decoded key/value pairs and flags any duplicates it finds.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Watch the plus sign. In q=a+b%2Bc the plain plus becomes a space while the encoded one stays a literal plus, so the tool shows q = a b+c. That difference is a common source of broken search links and signature checks. Names like a[]=1 and a[]=2 are flagged as duplicates here even though many frameworks treat them as one list. Which odd query strings have you had trouble with?

Popular calculators

All Calculators