Development & Design 92

Query string parser

Decodes key and value in URL query, and identifies duplicate keys as an array.

Input

The example value has been entered. Check it immediately or change the value.

Run with Ctrl or ⌘ + Enter

Input is processed in the browser. Refreshing returns a sample value.

Result

Check or change the value using the example value result.

Plus signs are interpreted as spaces. All values in the result are strings.

Share result

Share the tool link and result text together. No URL is included in the result. Check the below content and then share it.

Calculation·conversion criteria

Separates key and value in URL query down to individual items.

Decodes using URLSearchParams and preserves all values for the same key.

Input example

?a=1&a=2 → a: [1,2]

a=1&a=2&name=A+B preserves the two values of a and the A B of name. All values are displayed as a string array.

How to use

  1. Use the provided example value or change the query string item.
  2. Click Verify result and check the following result.
  3. Result can be copied if needed.

Frequently Asked Questions

When the same key repeats, only the last value remains?

No. All inputs are preserved in order. Enter the query part after the question mark instead of the full address. This tool interprets + as a space according to form query rules.

Calculation criteria and reference materials

Verification of calculation criteria: · Calculation·verification principles · Report errors