URL Query String Parser

Parse any URL or query string into decoded key/value pairs, or build a query string from custom parameters.

Paste a full URL or just the query string (with or without the leading ?).

Paste a URL or query string to see its parameters

URL Query String Parser

A query string is the portion of a URL that follows the '?' character, consisting of key=value pairs separated by '&'. This tool uses the browser's built-in URLSearchParams API to parse any URL or raw query string, automatically handling percent-encoding so you see the fully decoded parameter names and values in a clear table.

You can also work in reverse: add as many key/value rows as you need and the tool will instantly build a properly encoded query string ready to append to any URL. This is invaluable when debugging API requests, constructing redirect links, or inspecting tracking parameters in marketing URLs.

How it works

Parsing: extract the portion after '?' then split on '&'; each segment is split on the first '=' to give key and value, both decoded via decodeURIComponent(). Building: use URLSearchParams.append(key, value) for each row, then prefix the result with '?'.

Use cases

  • Debugging REST API requests by inspecting URL parameters
  • Analyzing UTM tracking parameters in marketing campaign links
  • Building redirect or callback URLs with dynamic query strings
  • Decoding percent-encoded values from browser address bars
  • Testing query string handling in web application development

Frequently asked questions

What is a query string in a URL?

The query string is everything after the '?' character in a URL, made of key=value pairs joined by '&' — for example, ?page=2&sort=price. Servers and client-side scripts read these parameters to filter results, track campaigns, or pass state between pages. This tool splits any URL or raw query string into a decoded table of its parameters.

How do I decode %20 and other percent-encoded characters in a URL?

Percent-encoding represents reserved or non-ASCII characters as % followed by their byte value in hexadecimal: %20 is a space, %2F is '/', and %3D is '='. In JavaScript, decodeURIComponent() reverses the encoding, which is exactly what this parser applies to every key and value. Note that in query strings a '+' is also commonly interpreted as a space.

What is URLSearchParams?

URLSearchParams is a built-in browser API for reading and building query strings. It provides methods such as get(), getAll(), append(), and toString(), and handles percent-encoding automatically. This tool uses it under the hood both to parse the string you paste and to build a correctly encoded query string from your key/value rows.

Can a query string contain the same key more than once?

Yes — repeated keys are valid and common, for example ?tag=red&tag=blue. How they are interpreted depends on the server: some frameworks return an array of values, others keep only the first or last occurrence. URLSearchParams exposes all occurrences via getAll(), and this parser lists each repeated pair as its own row.

What are UTM parameters in a URL?

UTM parameters are standardized query string keys used by analytics tools to attribute traffic: utm_source, utm_medium, utm_campaign, utm_term, and utm_content. For example, ?utm_source=newsletter&utm_medium=email identifies visits coming from an email campaign. Pasting a campaign link into this parser shows each UTM value decoded and easy to audit.

Related Calculators