URL Query String Parser
Inspect every part of a URL and see its query parameters decoded, grouped and exported as JSON. Handy for debugging a tracking link, an OAuth callback or an API request whose parameters arrive in an unexpected shape.
URL
Parsed URL
Ready — paste some input or load the sample.
100% Client-Side · Privacy First. This tool runs entirely inside your browser. Nothing you type is uploaded, logged or sent to a server — you can even use it offline.
Overview
Every query string is a flat list of key and value pairs, and the rules for reading one are stricter than most people expect. The parser splits on the first equals sign, so a value may itself contain equals signs. A plus sign means a space, and any percent sign starts a two-digit escape that can represent any byte, including UTF-8 sequences. A parameter can also appear more than once, in which case it is a list rather than a single value, and an empty value such as ?debug is a real value that is an empty string. This tool takes a full URL and returns a structured breakdown: the scheme, host, port, path and origin, a table of every query parameter with its decoded value, the fragment, and the decoded parameters as JSON that you can paste into code. It follows the same rules as the URL parser inside every modern browser, so what it shows you is exactly what your own JavaScript would see.
How to use the url query string parser
- 1Paste a full URL such as https://example.com/page?ref=abc into the input panel.
- 2Read the breakdown of the scheme, the host, the port, the path and the origin.
- 3Check the query parameter table, where every row shows the decoded value.
- 4Copy the JSON when you need the parsed parameters as code.
- 5Read the notes for anything unusual, such as a repeated key or a value that could not be decoded.
- 6Mind the encoding: a redirect target is often double encoded, and the parsed value may look broken while the raw one is correct.
Cheat sheet
The syntax you will use most, and what each part does.
| Pattern | What it means |
|---|---|
?a=1&b=2 |
The standard separator is an ampersand, and the first equals sign divides key from value. |
a=1=2 |
Only the first equals sign splits the pair, so the value is 1=2. |
+ means space |
A plus sign in a query string is decoded to a space, exactly as in application/x-www-form-urlencoded. |
%20 and %2F |
Percent encoding: %20 is a space, %2F is a slash, %26 is an ampersand. |
?flag |
A key with no equals sign has an empty string value, not a null one. |
?a=1&a=2 |
A repeated key holds a list of values. A parser that keeps only the last one loses data. |
Common mistakes
A value comes back truncated.
The raw value contained a percent escape that was cut in half, often by a copy and paste through a chat client. Encode the value again before sending it.
A key disappears.
Look for a duplicate key. Many parsers keep only the last occurrence, which silently discards the earlier values.
Spaces turn into plus signs.
That is correct for query strings, but it means a literal plus in the data must be encoded as %2B before it is put into a URL.
The whole URL is rejected.
A bare query string with no host cannot be parsed. Prefix it with any host name, for example example.com/?a=1.
Worked examples
A tracking URL
https://example.com/p?ref=newsletter&utm_source=mail&campaign=launch
The URL components, three query parameters with their decoded values, and a JSON block ready to paste into code.
A repeated key
https://example.com/list?tag=a&tag=b&tag=c
A single tag parameter whose value is a list of three strings instead of one string.
Frequently asked questions
Does the parser send my URL anywhere?
No. The URL is parsed in your browser, which is why it is safe to paste an internal address or a callback that carries a session token.
How are repeated keys represented?
Every occurrence is kept, so a query with tag=a&tag=b&tag=c produces three entries with the same key. The JSON export keeps them all in the order they appeared.
Can I paste just the query string?
Yes. A leading question mark is optional, so "?a=1&b=2" and "a=1&b=2" are both accepted and parsed the same way.
What else does the breakdown show?
The scheme, the host, the port, the path, the origin, the fragment and the number of parameters, which is often where a mistake becomes obvious.
How are percent escapes handled?
They are decoded, so %20 becomes a space and %2F becomes a slash. A plus sign is also read as a space, because that is what the form encoding rules say.
What does a parameter without a value look like?
A flag such as "?debug" is kept with an empty value, because that is how it is read by a server and by every query string parser.
What about the fragment after the hash?
It is separated out and shown on its own. The fragment never reaches a server, so a value that only appears there is a client side value and not a parameter of the request.
How do I use the JSON that is produced?
Paste it into your code as the object your request library expects. It is already decoded, so you do not have to call decodeURIComponent on every value yourself.
Why does the JSON keep every occurrence of a repeated key?
Because dropping the duplicates would change the data. Most frameworks provide a helper that turns the list into an array, so you can decide what the shape should be.
Can I paste a URL that contains a password?
The URL is parsed locally, so nothing is uploaded, but the password still appears on your screen. Remove the credentials from the string before you paste it anywhere else.
What happens to a value that has no equals sign?
It is treated as a flag with an empty value, exactly as a server side parser would treat it. That is the form used for options such as ?debug or ?verbose.