Query string parser
Paste a URL or just its query string to see every parameter decoded, in order, with repeated keys kept. Switch to Build to write parameters as lines or JSON and get a correctly encoded query string.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Choose Parse to read a query string or Build to write one.
- Parse: paste the URL or query. Pick lines or JSON and whether
+ means a space.
- Build: write one
key=value per line, or a flat JSON object, and pick how spaces are written.
How it works
The query is split at &. Each pair is split at its first = and both halves are percent-decoded as UTF-8. A pair without = has an empty value. Order is kept exactly as in the URL.
Example
?q=red+shoes&size=42&size=43&ref=a%26b gives
q=red shoes
size=42
size=43
ref=a&b
As JSON the repeated key becomes an array: "size": ["42", "43"].
Tips
Frameworks differ on arrays: some write size[]=42&size[]=43 or size[0]=42. This tool does not interpret brackets, so those keys show up literally, which is what the server receives.
Frequently asked questions
What is the difference between + and %20 for a space?
In the form encoding that browsers use for HTML forms (application/x-www-form-urlencoded), a space is written as + and a real plus sign as %2B. In URL paths and in most APIs, a space is %20 and + means a plus. Switch the option to match the system you are working with.
What happens to repeated keys?
In the lines view every occurrence is listed in order. In the JSON view a key that appears once is a string and a key that appears more than once becomes an array. Building from JSON does the reverse, writing one key=value pair for each array item.
Can I paste a whole URL?
Yes. The query is taken from the part between ? and #. A text without a scheme is treated as a bare query string, with or without a leading ?.
How are special characters encoded when building?
Keys and values are encoded like JavaScript's encodeURIComponent. Letters, digits and - _ . ! ~ * ' ( ) stay as they are, everything else becomes %XX in UTF-8.
Why can a key not contain = in the lines format?
Each line is split at its first =, so the key ends there. Put such keys in a JSON object instead, where the key is a quoted string.