🔗 URL Query String Parser
By ToolNimba Web Dev Team · Updated 2026-06-19
| Key | Value |
|---|
Paste a URL or query string and press Parse.
A query string is the part of a URL after the "?" that carries data as key=value pairs joined by "&". This tool reads any URL or bare query string and lists every parameter with its decoded value in a clean table, so you can see exactly what a link is passing. Switch to Build mode to assemble a properly encoded query string from your own key/value rows and copy it. Everything runs in your browser using the native URL and URLSearchParams APIs, so no link or data ever leaves your machine.
What is the Query String Parser?
The query string sits between the "?" and any "#fragment" in a URL. It is a list of name/value pairs: each pair is written as key=value, pairs are joined with "&", and the whole thing is how a page receives input such as a search term, a page number, a filter, or campaign tracking like utm_source. The same key can legitimately appear more than once (for example tag=red&tag=blue), which is how multi-value selections are passed, so a parser has to preserve every occurrence rather than collapse duplicates.
Values in a query string are percent-encoded so that characters with special meaning ("&", "=", "?", "#", spaces) do not break the structure. A space becomes either %20 or a "+", an ampersand inside a value becomes %26, and so on. This tool uses the browser's built-in URLSearchParams to decode each value back to its readable form, which means a "+" in the query is correctly turned into a space and every %XX sequence is resolved. In Build mode the same API encodes your input the other way, escaping reserved characters automatically so the string you copy is always valid.
Parsing and building with the standard API matters because hand-rolled encoding is a common source of bugs: forgetting to escape a "&" inside a value silently splits one parameter into two, and mishandling "+" versus %20 changes the data the server receives. Reaching for URL and URLSearchParams (the same engine browsers use) avoids those traps, gives you the exact decoded values, and produces an encoded string you can drop straight into a link, an API call, or a redirect.
When to use it
- Inspecting a long marketing or tracking URL to see exactly which utm_source, utm_medium and campaign parameters it carries.
- Debugging an API request by decoding the query string and confirming each parameter and value is what the client actually sent.
- Building a correctly encoded query string for a link or redirect when a value contains spaces, ampersands or other reserved characters.
- Checking whether a key appears more than once (for example repeated filter values) and what order the values are in.
How to use the Query String Parser
- In Parse mode, paste a full URL or a bare query string into the box.
- Press Parse (or just type) to see each parameter and its decoded value listed in the table.
- Use "Copy JSON" to grab the parameters as a JSON object, with repeated keys grouped into arrays.
- Switch to Build mode, add key/value rows, and copy the encoded query string that is generated automatically.
Formula & method
Worked examples
Parsing the URL https://example.com/search?q=blue+shoes&size=10&page=2
- The tool isolates the query: ?q=blue+shoes&size=10&page=2
- It splits on "&" into three pairs: q=blue+shoes, size=10, page=2
- It decodes each value: the "+" in "blue+shoes" becomes a space
Result: q = blue shoes, size = 10, page = 2
Building a query string from key/value rows q = blue shoes and category = men & women
- Enter q with value "blue shoes" and category with value "men & women"
- The space in "blue shoes" is encoded as "+"
- The "&" inside "men & women" is escaped as %26 so it does not split the pair
Result: ?q=blue+shoes&category=men+%26+women
Common characters and how they appear when percent-encoded in a query string
| Character | Encoded as | Why |
|---|---|---|
| Space | %20 or + | A literal space would break the URL; "+" is the legacy form for spaces. |
| & (ampersand) | %26 | An unescaped "&" would start a new key/value pair. |
| = (equals) | %3D | An unescaped "=" would be read as the key/value separator. |
| ? (question mark) | %3F | Marks the start of the query; escaped when used inside a value. |
| # (hash) | %23 | Starts the fragment; everything after a raw "#" is dropped from the query. |
| % (percent) | %25 | The escape character itself must be escaped to be a literal percent. |
Parts of a URL, using https://example.com/path?id=42&sort=new#top
| Part | Example | Role |
|---|---|---|
| Scheme | https | The protocol used to fetch the resource. |
| Host | example.com | The domain serving the page. |
| Path | /path | The resource location on the host. |
| Query string | ?id=42&sort=new | The key/value data after the "?". |
| Fragment | #top | An in-page anchor; not sent to the server. |
Common mistakes to avoid
- Not encoding an ampersand inside a value. Writing category=men & women without escaping the "&" creates two parameters ("category=men " and " women") instead of one. The "&" inside a value must be %26. Build mode does this for you.
- Confusing "+" and %20 for spaces. In a query string a space can be "+" or %20, and both decode to a space. Outside the query (in the path) "+" is a literal plus, which is why copying a path fragment into a query can change the meaning.
- Assuming each key appears only once. A query string can repeat a key, such as tag=red&tag=blue, to pass multiple values. Code that reads only the first or last occurrence silently drops data, so parse every pair.
- Putting data after a "#" and expecting the server to see it. Everything after the "#" is the fragment and is never sent to the server. Parameters meant for the backend must live in the query string before any "#".
Glossary
- Query string
- The part of a URL after the "?" that carries data as key=value pairs joined by "&".
- Parameter
- A single key/value pair within the query string, for example page=2.
- Percent-encoding
- Replacing reserved or unsafe characters with a "%" followed by two hex digits, such as %20 for a space.
- URLSearchParams
- A built-in browser API that parses and serialises query strings, handling decoding and encoding correctly.
- Fragment
- The portion of a URL after "#"; it identifies an in-page anchor and is not sent to the server.
Frequently asked questions
What is a query string parser?
A query string parser reads the key=value pairs from the part of a URL after the "?" and returns each parameter with its decoded value. This tool does that in your browser, listing every parameter in a table and letting you copy them as JSON.
Does it decode the values automatically?
Yes. The tool uses the browser URLSearchParams API, so a "+" becomes a space, %20 becomes a space, %26 becomes an ampersand, and every other percent-encoded sequence is resolved to the original character.
Can I paste a full URL or only the query part?
Either works. Paste a complete URL like https://example.com/page?a=1&b=2 and the tool extracts the query automatically, or paste just ?a=1&b=2 or even a=1&b=2 directly.
How does it handle a key that appears more than once?
It preserves every occurrence and lists each as its own row in the order they appear. When you copy as JSON, repeated keys are grouped into an array so no value is lost.
How do I build an encoded query string?
Switch to Build mode, add a row for each key and value, and the encoded query string is generated automatically. Spaces, ampersands and other reserved characters are escaped for you, ready to copy.
Is my URL data sent anywhere?
No. All parsing and building happens locally in your browser with native JavaScript APIs. Nothing you paste or type is uploaded, logged, or sent to any server.