Inspect and Rebuild a Fictional Search Query String
Parse repeated and encoded query parameters, edit values in the builder, and verify how URLSearchParams serializes the result.
By DevSphere Editorial · · 5 min read
Open Network ToolsUse a synthetic query rather than a live credential
Query strings often make debugging difficult because spaces and repeated parameters are encoded into a single compact line. This example uses a fictional catalog search request with a name, page number, and two labels. Open Network Tools and choose Query String Parser. Keep the input synthetic; query strings may contain authentication tokens, email addresses, or search terms that should not be copied into a public ticket. The tool displays parsed values in the browser and does not fetch the URL.
Paste the query without a leading question mark, or include one because the parser removes an initial question mark before constructing URLSearchParams. The default sample demonstrates URL encoding and array-style names. Inspect the structured result and compare it with the original text. This tool parses parameters; it does not know the API's schema, validate expected value types, or establish that a server would accept the request.
?q=blue%20mug&page=2&tag[]=ceramic&tag[]=sale
Read decoded and repeated values
The parser decodes percent-encoded text, so blue%20mug appears as the value blue mug. Keys ending in [] are normalized by removing the brackets and collected into an array. Repeated ordinary keys are also collected after the first occurrence. This behavior is helpful when an API uses repeated parameters for filters, but another server may interpret the same spelling differently. Preserve the original query if exact wire representation or parameter ordering is important.
Check the display for the exact key names and values. URLSearchParams applies web form query semantics, including encoding spaces in its own serialization convention. An empty value can be meaningful, and a query may contain the same key more than once. Do not assume a parsed object preserves all ordering or distinctions of a complicated query, particularly where bracket notation or duplicate keys have special application meaning.
Parsed conceptual values:
q = "blue mug"
page = "2"
tag = ["ceramic", "sale"]
Build a clean query from key-value rows
Switch to the builder mode and use its key-value pair rows. Enter q and blue mug, page and 2, then add tag and ceramic and another tag and sale. The builder appends each nonempty key to URLSearchParams and emits a serialized query string. Values are encoded as needed, so a space becomes a percent-encoded representation. The interface lets you add and remove rows and edit each key or value.
Compare the output with the original. The builder does not automatically add square brackets to repeated keys; adding two tag rows produces two repeated tag parameters. If a target API requires tag[] specifically, enter that key spelling in each row. This is a deliberate distinction: the parser normalizes [] keys in its object view, while the builder serializes exactly the key names you provide. Test against the receiving API's documented convention.
Builder rows:
q | blue mug
page | 2
tag[] | ceramic
tag[] | sale
Troubleshoot plus signs, encoding, and duplicates
If spaces appear as plus signs or percent escapes after serialization, that is normal query-string encoding behavior; it does not mean the underlying value changed. Compare decoded values rather than looking only at the encoded surface form. If a parameter appears as an array unexpectedly, check whether the key was repeated. If a bracketed name is normalized, remember that the parser intentionally removes the final [] suffix for array-style display.
Malformed or unusual percent sequences can be handled by the browser's URLSearchParams implementation, and this UI does not report a schema-level error. It returns a simple object and may not preserve distinctions useful to a custom backend. For exact debugging, compare the raw request captured by your own authorized client with what the server expects. The tool is not a proxy, network inspector, or API client.
Keep query data safe and reproducible
Use fictional sample values in documentation and screenshots. Query strings are often logged by browsers, proxies, and servers, so secrets in a URL can leak beyond the page itself. If you encounter a real credential in a query, follow your organization's incident process rather than pasting it into a generic parser. The tool neither hides nor redacts values; it displays them for inspection.
A reproducible debugging note should include the raw synthetic query, expected decoded values, and any API-specific array convention. The parser and builder help you understand serialization, but they do not verify server behavior. Validate the final query using a safe test endpoint or controlled local fixture before using it with a live service.
One useful experiment is to add an empty search term and then remove it, observing whether the serialized output includes a key with an empty value. Some endpoints distinguish an omitted parameter from an explicitly empty one, even though a simple parser view can make the distinction easy to overlook. Compare the exact raw query with the endpoint's contract and repeat the test using its approved test data. That small check can prevent a frontend from silently changing the meaning of a filter when it serializes form values.
For repeated values, test one value, then two values, and compare the rebuilt query with the receiving service's documented examples. A backend may expect repeated keys, bracketed arrays, comma-separated values, or a JSON body instead. The parser normalizes only the final [] suffix and cannot decide which convention is semantically correct. Preserve the exact raw request when order or duplicate handling is part of the bug, and avoid treating the parsed object view as a lossless request capture.