Web & HTTP

Query String Parser: Decode and Inspect URL Query Parameters

Instantly parse any URL query string into readable key-value pairs. Decode percent-encoded characters and inspect parameters one by one.

Published January 15, 2025Updated June 1, 20254 min read

Try the free online tool

Runs entirely in your browser — no signup, no uploads.

Open Tool

URLs frequently carry data through their query strings — those key-value pairs that appear after the question mark. When you see a URL like `/search?q=hello+world&page=2&sort=asc`, everything after the `?` is the query string. Parsing it correctly is essential whenever you're debugging a broken link, inspecting analytics parameters, or developing a web application.

Reading raw query strings can be tricky. Values are percent-encoded, meaning spaces become `%20` or `+`, and special characters are replaced with their hexadecimal equivalents. Without a parser, understanding what a URL is actually passing along requires manual decoding — a time-consuming and error-prone process.

This tool takes any raw query string or full URL and immediately breaks it down into a clean table of key-value pairs, decoding all percent-encoded characters along the way. It's a quick way to understand exactly what data a URL is sending.

What Is a URL Query String?

A query string is the portion of a URL that follows the `?` character and contains one or more parameters in the form `key=value`. Multiple parameters are separated by `&`. For example: `?name=Jane&age=30&city=New+York`.

Query strings are used to pass data to a server or client-side application as part of an HTTP GET request. They appear in search queries, pagination controls, filter settings, tracking parameters, and API request parameters.

The values in a query string are URL-encoded (also called percent-encoded). This means characters that are not safe in URLs — like spaces, ampersands, equals signs, and non-ASCII characters — are replaced with a `%` followed by their two-digit hexadecimal code. A space, for example, becomes `%20` or `+`.

How to Use This Tool

Paste a query string or full URL and get an instant breakdown of all parameters.

  1. 1

    Paste your URL or query string

    Enter a full URL (e.g., https://example.com/search?q=hello&page=2) or just the query portion (?q=hello&page=2) into the input field.

  2. 2

    Click Parse

    Hit the Parse button to process the input and extract all key-value pairs from the query string.

  3. 3

    Review the decoded table

    The tool displays a table with one row per parameter, showing the raw key, the decoded key, and the decoded value.

  4. 4

    Inspect individual values

    Click on any row to see the full raw and decoded value, which is useful for long or complex encoded strings.

  5. 5

    Copy or export

    Copy individual values or export the full parameter list as JSON for use in testing or documentation.

Common Use Cases

Query string parsing is useful in many development and debugging scenarios.

  • Debugging broken links — verifying that a URL contains the expected parameters and that they are correctly encoded.
  • Inspecting analytics and tracking parameters — reading UTM parameters (utm_source, utm_medium, etc.) to understand a campaign URL.
  • Reviewing API requests — checking what parameters a client is sending to a REST API endpoint during development.
  • Extracting data from shared URLs — pulling product IDs, search terms, or filter values from a URL sent by a user.
  • Testing URL parsing logic — validating that your application correctly reads edge-case parameter values like arrays or empty strings.

Tips and Best Practices

Keep these points in mind when working with query strings.

  • Never read raw query string values directly — always URL-decode them before use to avoid displaying garbled text.
  • Be aware that parameter keys can repeat in a query string (e.g., `color=red&color=blue`), which represents an array of values.
  • Watch out for the `+` vs. `%20` distinction — both represent a space, but some parsers treat them differently.
  • Treat all query parameter values as untrusted user input and sanitize them before use to prevent injection attacks.
  • When debugging, check for double-encoding — a value that was already encoded and then encoded again will appear garbled.

Frequently Asked Questions

What is the difference between a query string and a URL fragment?

A query string follows the `?` and is sent to the server as part of the HTTP request. A fragment follows the `#` and is handled entirely by the browser; it is never sent to the server.

Can a query string contain special characters?

Yes, but they must be percent-encoded. Characters like `&`, `=`, `#`, `+`, and non-ASCII characters all have special meaning or are unsafe in URLs and must be encoded before inclusion in a query string.

What happens when the same key appears multiple times in a query string?

This is valid and commonly used to represent an array of values. For example, `?tag=js&tag=css` would be parsed as `tag: ['js', 'css']` in most server frameworks.

Is there a maximum length for a query string?

HTTP itself does not specify a maximum URL length, but browsers and servers impose limits. Most servers and browsers support at least 2,048 characters; exceeding this can cause requests to fail.

Can a query string have a key with no value?

Yes. A parameter like `?verbose` or `?verbose=` is valid. The key is present but the value is empty or undefined, which some frameworks interpret as a boolean flag.

How is URL encoding different from Base64 encoding?

URL encoding (percent-encoding) replaces unsafe characters with `%XX` hex sequences so the URL remains valid. Base64 encoding is a binary-to-text scheme unrelated to URL safety — it encodes arbitrary binary data into printable ASCII characters.

urlquery stringquery parametersencodingweb

Ready to use this tool?

Free, instant, no account required. Runs entirely in your browser.

Open Tool

More Web & HTTP Guides