Query String Parser
Parse a URL or query string into its parameters, decoding each value and flagging repeated keys.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Query String Parser does
The query string parser on this page will parse a URL or query string into its parameters, decoding each value and flagging repeated keys. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for debugging a long URL with many tracking parameters. Companion tools to this one live on FreeToolsWorld.org.
How to use it
- Paste a full URL or just the query string.
- Leave decoding on to see the real values rather than the encoded ones.
- Check the repeated-keys warning if one appears.
How it works
Repeated keys are the interesting case, because nothing in the URL specification says what should happen. PHP keeps the last value. Express and most Node frameworks build an array. Some servers keep the first. ASP.NET joins them with commas. A URL with a duplicated parameter behaves differently depending on what is reading it, which makes it a reliable source of bugs and occasionally of security issues.
Plus signs are decoded as spaces here, which is correct for application/x-www-form-urlencoded data — the format query strings conventionally use — and wrong for a path segment, where a plus is a literal plus. The two contexts have genuinely different rules.
URL length limits are a practical concern. The specification sets none, but browsers and servers do: around 2000 characters is the safe working limit across the common stack, and some servers reject longer request lines outright.
When to use it
- Debugging a long URL with many tracking parameters.
- Reading a redirect or callback URL.
- Checking which UTM parameters a link carries.
- Finding a duplicated parameter that is causing inconsistent behaviour.
Common mistakes to avoid
- Assuming a repeated parameter behaves consistently across servers. It does not.
- Decoding plus signs as spaces in a path segment, where a plus is literal.
- Building URLs past about 2000 characters, which some servers reject.
Frequently asked questions
What happens if a URL has the same parameter twice?
It depends entirely on the server. PHP takes the last, Express builds an array, ASP.NET joins with commas, some servers take the first. There is no standard.
Why is + decoded as a space?
Because query strings conventionally use application/x-www-form-urlencoded, where a plus means a space. In a path segment a plus is a literal plus — different rules for different parts of the URL.
How long can a URL be?
The specification sets no limit, but practical limits do exist: around 2000 characters is safe across browsers and servers, and some reject longer request lines.