Break a query string or a whole URL into key and value pairs, see it as JSON, or build a query string from a list. Encoding and decoding of special characters is handled for you, which removes a lot of fiddly mistakes when working with APIs and tracking links.
How to use it
- Choose parse, parse to JSON or build.
- Paste a query string or URL, or type key = value lines.
- Read the result.
- Copy it.
When it helps
- Reading the parameters in a long link.
- Building an API request URL.
- Converting a query to JSON for testing.
- Checking how values are encoded.
Good to know
- Repeated keys become an array in the JSON view.
- When building, put one key = value on each line.
- A leading question mark is fine but not required.
How query strings are structured
A query string comes after the question mark in a URL and consists of key=value pairs joined by ampersands. Special characters are percent-encoded: a space becomes %20 or a plus sign, and an ampersand inside a value becomes %26. A fragment after a hash sign isn't part of the query.
The same key can appear more than once, as in tag=a&tag=b, and servers handle repeated keys differently.
Worked example: a campaign link
A link ending in ?utm_source=newsletter&utm_medium=email&utm_campaign=spring shows exactly how your visitors found the site. Paste the link into the tool and each parameter appears on its own line, decoded.
In Build mode, enter the key and value lines for your own link and get a correctly encoded query string to append.
Security and privacy
Don't put secrets such as passwords or tokens in query strings: URLs are stored in browser history, server logs and referrer headers. Use headers or the request body for sensitive data.
Be careful with redirect parameters, such as ?next=, which attackers can abuse. Always validate where users are sent.
Parsing in code
In browsers and Node, use the URLSearchParams class: new URLSearchParams(location.search).get('id'). In Python, urllib.parse.parse_qs returns lists of values. Avoid splitting on ampersands by hand, since encoding makes that error-prone.
Always validate and encode data, never trust parameters, and set sensible limits on length.
Encoding reference
Common encodings: space is %20 (or + in forms), ampersand %26, equals %3D, question mark %3F, hash %23, slash %2F, plus %2B and percent %25. Non-English characters use their UTF-8 bytes, such as %C3%A9 for é.
Encoding the value, not the whole URL, keeps the structure intact.
Handling spaces and plus signs
In query strings, a plus sign usually means a space, while a literal plus must be written as %2B. Mixing these up is a frequent cause of values that look slightly wrong after a round trip.
Round trip check
Parse a query string, copy the key-value lines, and then build it again. If the two strings match, apart from order and encoding style, your data survived the round trip.
Questions
What if a parameter has no value?
It appears with an empty value.
Are values decoded?
Yes, when parsing.