Developer Tools

Query String Parser

Live

Decode a query string into named parameters and structured JSON.

About Query String Parser

Decode a query string into named parameters and structured JSON. Enter query string, repeated-key handling, treat plus as space in a purpose-built developer workspace with explicit units and relevant controls. URLSearchParams decodes percent escapes and repeated keys are preserved according to the selected mode. The result panel reports parsed parameters, parameter values, unique keys, parameter table with supporting context. Results depend on the entered assumptions and should be checked against the real terms, measurements, or source data. Processing stays in your browser and entered values are not sent to UtilityPages.

Set up Query String Parser

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

This workspace updates as you edit.

Enter the query string used by this tool.

Enter the repeated-key handling used by this tool.

Enter the treat plus as space used by this tool.

Query String Parser results

Enter the values above, then parse query string to see the result.

Query String Parser method

URLSearchParams decodes percent escapes and repeated keys are preserved according to the selected mode.

How it works

URLSearchParams decodes percent escapes and repeated keys are preserved according to the selected mode. Results depend on the entered assumptions and should be checked against the real terms, measurements, or source data.

Examples

Query String Parser example

Example input
{
    "query_string": "?q=utility+tools&tag=calculator&tag=converter&page=2",
    "duplicate_key_mode": "array",
    "plus_as_space": true
}
Expected result
{
    "json": "{\n  \"q\": [\n    \"utility tools\"\n  ],\n  \"tag\": [\n    \"calculator\",\n    \"converter\"\n  ],\n  \"page\": [\n    \"2\"\n  ]\n}",
    "parameter_count": 4,
    "unique_key_count": 3,
    "parameters": [
        {
            "key": "q",
            "value": "utility tools"
        },
        {
            "key": "tag",
            "value": "calculator"
        },
        {
            "key": "tag",
            "value": "converter"
        },
        {
            "key": "page",
            "value": "2"
        }
    ]
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Frequently asked questions

How does the Query String Parser work?

URLSearchParams decodes percent escapes and repeated keys are preserved according to the selected mode.

What should I enter in the Query String Parser?

Enter query string, repeated-key handling, treat plus as space. Keep units consistent with the labels and use values from the same scenario.

What does the Query String Parser return?

The result includes parsed parameters, parameter values, unique keys, parameter table. Supporting values are included to make the headline result easier to check.

How exact is the Query String Parser?

Results depend on the entered assumptions and should be checked against the real terms, measurements, or source data.