Developer Tools

Parse a URL Query String

100% Free No Signup Runs in Browser

Transform pasted text with the query string parser and copy the cleaned output.

Direct Answer

Use the Query String Parser when you have a URL with query parameters and need to see each key and value decoded and separated, instead of reading the raw ?key=value&key2=value2 string by eye.

What counts as the query string

A URL has distinct parts, and only one specific segment is the query string a server-side parser will actually receive.

  • everything after the ? and before an optional # is the query string
  • the fragment after # is never sent to the server at all
  • the leading ? itself is a delimiter, not part of any key or value
  • keys and values are separated by = and pairs are separated by &

Encoding quirks that break naive parsing

Query strings look plain-text simple but carry a few encoding rules that trip up manual parsing.

  • spaces may appear as %20 or as + depending on the encoding context
  • reserved characters like & and = inside a value must be percent-encoded (e.g. %26)
  • duplicate keys are not handled consistently across frameworks
  • bracket or dot notation for nested structures is a framework convention, not a URL standard

How to Use Query String Parser

  1. Paste or type your content into the input box.
  2. The transformed result appears instantly in the result panel below.
  3. Click Copy result to copy the output to your clipboard.
  4. Download .txt saves the transformed text as a file.
  5. Reset clears everything and lets you start over.

Reference

FeatureDetails
PurposeTransform pasted text into a cleaner or different format.
InputText, lines, lists, or copied content.
ResultTransformed text ready to copy or download.
Best forCleanup, formatting, list preparation, and copy-paste workflows.
CategoryDeveloper Tools
Works onDesktop, tablet, and mobile browsers

Useful Related Tools

Frequently Asked Questions

What exactly counts as the query string in a URL?

Everything between the ? and an optional # is the query string. The fragment after # (used for in-page anchors or client-side routing) is not part of the query string and is never sent to the server at all.

How are duplicate keys like ?tag=a&tag=b handled?

There's no universal standard. Some server frameworks silently keep only the last value for a repeated key, others automatically collect repeated keys into an array, and some require an explicit array syntax like tag[]=a&tag[]=b to get array behavior. The right interpretation depends entirely on what's parsing it on the other end.

How are spaces encoded in a query string?

They can appear as %20 (standard percent-encoding) or as a literal + character. The + convention comes from the application/x-www-form-urlencoded format used by HTML forms, so a parser that doesn't account for both can decode spaces incorrectly depending on how the URL was built.

Why do I see %26 in a value instead of a literal &?

Because an unencoded & inside a value would be misread as the separator starting a new key-value pair. Encoding it as %26 keeps it part of the value instead of splitting the query string in the wrong place.

Is the leading ? part of the query string itself?

No. The ? is just the delimiter marking where the path ends and the query string begins - it isn't included in any key or value once the query string is parsed.

Are query string keys case-sensitive?

Yes, by convention - foo and Foo are technically different keys. Whether a particular backend framework treats them as the same depends on how that framework's routing or parsing code is written, not on any URL-level rule.

Can a query string represent nested objects?

Not natively - the query string format itself only knows flat key-value pairs. Frameworks emulate nesting with conventions like bracket notation (filter[status]=active) or dot notation, and these conventions differ between ecosystems like PHP and JavaScript's qs library.

What's the difference between encodeURIComponent and encodeURI for query values?

encodeURIComponent escapes characters like &, =, and ? that have special meaning in a query string, making it safe to encode a single value. encodeURI leaves those characters untouched because it's meant to encode a complete URI where they're expected to keep their structural role.

Browse Categories

Related Tools

View category