URL Parser & Query String Analyzer
Parse a URL or query string: decode every parameter, flag repeated keys and double encoding, remove tracking tags, export JSON and build URLs from parts
Parse a URL or a query string
Paste a full URL, or only the part after the ?. It is parsed as you type and never leaves your browser.
Clean, sort and export the query
Build a URL from parts
See what a URL really contains, and what each parameter really says
A long link with tracking tags, repeated keys and escaped characters is hard to read by eye. Paste a whole URL or only its query string and this page splits it into scheme, credentials, host, port, path segments, query parameters and fragment, decodes every key and value, and puts a note next to anything suspicious: repeated keys, a plus that will be read as a space, double encoding, invalid UTF-8, a dropped default port, credentials in the address. You can then strip the tracking parameters, sort the rest, copy the query as JSON or build a URL from parts. Everything runs in your browser.
How a query string is split and decoded
The query is the text between ? and #. It is cut at every
&, and each piece is cut at its first =, so
q=a=b is the key q with the value a=b. A piece without
= (?debug) is a key with an empty value, and the tool marks it because some
servers treat it differently from debug=. Empty pieces such as the one in
a=1&&b=2 are skipped.
Decoding follows the application/x-www-form-urlencoded rules that browsers use for
forms and for URLSearchParams: + becomes a space and
%XX sequences are read as UTF-8 bytes, so %C3%A9 is é.
A literal plus therefore has to be sent as %2B: a=1%2B2 decodes to
1+2 while a=1+2 decodes to 1 2. In the path a plus is
just a plus, which is why the tool decodes path segments and query values differently.
Input is never rejected for being badly encoded. A % that is not followed by two hex
digits stays as typed, and bytes that are not valid UTF-8 (%E9 from a Latin-1 page) are
shown as the replacement character and flagged, so you can see the problem instead of an error page.
Repeated keys and bracket notation depend on the software that reads them
The standard does not say what a=1&a=2 means, so every stack decides for itself.
URLSearchParams.get("a") returns the first value and getAll("a") returns both.
Python's parse_qs returns a list for every key. PHP keeps the last value unless the key
ends in [], and Express (through the qs library) returns an array. The
table marks repeated keys so you do not assume one behaviour.
Keys such as tags[]=x&tags[]=y or user[name]=Ana are a convention, not
part of URLs. PHP and qs turn them into arrays and nested objects;
URLSearchParams keeps tags[] as a literal key. The JSON output has both
readings: by default the key is kept as written, and with Build arrays and objects the
brackets are expanded. Keys named __proto__, constructor and
prototype are ignored in that mode, since expanding them naively is a known route to
prototype pollution.
Tracking parameters and cleaner links
Marketing links often carry parameters that identify the campaign or the click, not the page:
utm_source, utm_medium, utm_campaign, gclid,
fbclid, msclkid, mc_eid and similar. They change the URL
without changing the content, which splits analytics, defeats caches and makes the same page look
like many. The tool marks them, and Remove tracking parameters drops them from the result.
Parameters you did not touch keep their original text, so a value written as %20 does
not silently turn into +; tick Re-encode every pair if you do want a
normalised string.
The list is a heuristic. Some parameters that look like tracking (ref, source)
also drive real behaviour on some sites, so they are not removed automatically.
Removing tracking from a link you share is harmless for the page, but it does not hide anything
from the site you visit.
What the URL parser adds to the query view
The URL is parsed with the WHATWG algorithm that browsers and Node.js use, so what you see is how they will read it. Some of what that algorithm does is silent, and the notes point it out:
- Default ports disappear.
https://example.com:443/is serialised without:443, which breaks plain string comparisons. - Hosts are normalised. The host is lowercased, an internationalised name such as
münchen.deis sent asxn--mnchen-3ya.de(shown here in both forms), andhttp://0x7f.1/becomes127.0.0.1. - The fragment never reaches the server. A single-page-app route such as
#/step?x=1has its own query; it is listed separately because only the page script can read it. - Credentials in the URL end up in logs, history and the clipboard. The password is masked in the table.
- Missing scheme.
example.com/pathand//cdn.example.com/a.jsare read as https, andlocalhost:3000as a host and port.mailto:,tel:andjavascript:keep their scheme (andjavascript:gets a warning).
Limits: the tool follows the URL standard and does not resolve relative references, does not check that a host exists and does not validate the TLD. Very long inputs are fine, but only the first dozens of rows are readable. It does not decode nested encodings such as a Base64 value inside a parameter; use the Base64 tools for that.
Code Examples
JavaScript: URLSearchParams reads the same way
const u = new URL("https://example.com/?a=1&a=2&q=caf%C3%A9+au+lait&tags[]=x&tags[]=y");
u.searchParams.get("a"); // "1" (first value)
u.searchParams.getAll("a"); // ["1", "2"]
u.searchParams.get("q"); // "café au lait" (+ is a space)
u.searchParams.get("tags[]"); // "x" (brackets are part of the key)
new URLSearchParams("a=1%2B2").get("a"); // "1+2"
new URLSearchParams("a=1+2").get("a"); // "1 2"Remove tracking parameters
const u = new URL("https://example.com/p?id=7&utm_source=news&gclid=abc&q=a%20b");
for (const k of [...u.searchParams.keys()]) {
if (k.startsWith("utm_") || ["gclid", "fbclid", "msclkid"].includes(k)) u.searchParams.delete(k);
}
u.href; // "https://example.com/p?id=7&q=a+b" (note: URLSearchParams rewrites %20 as +)Python: parse_qs returns lists and drops blanks by default
from urllib.parse import parse_qs
parse_qs("a=1&a=2&b[]=x") # {'a': ['1', '2'], 'b[]': ['x']}
parse_qs("a=&b") # {} (blank values are dropped)
parse_qs("a=&b", keep_blank_values=True) # {'a': [''], 'b': ['']}Percent-encoding for query values
encodeURIComponent("a b+c&d=e/é"); // "a%20b%2Bc%26d%3De%2F%C3%A9"
encodeURI("a b+c&d=e/é#"); // "a%20b+c&d=e/%C3%A9#" (keeps & = / # + : not for values)Standards & Specifications
- WHATWG URL Standard — Defines URL parsing, host normalisation, default ports and application/x-www-form-urlencoded parsing used by URLSearchParams
- RFC 3986 — URI Generic Syntax — Defines scheme, authority, path, query and fragment and percent-encoding
- RFC 3492 — Punycode — The encoding behind xn-- host labels for internationalised domain names
Frequently Asked Questions
How do I parse a query string into key and value pairs?
Paste the whole URL, or just the query part (with or without the leading ?), and the tool lists every parameter with its decoded key and value in the order they appear. It splits on & and on the first = of each pair, turns + into a space, decodes percent-escapes as UTF-8 and shows a note next to anything odd. You can copy the result as JSON.
What happens with repeated keys such as a=1&a=2?
Every occurrence is listed and the key is marked as repeated. Software differs: URLSearchParams.get returns the first value and getAll returns both, Python's parse_qs returns a list, PHP keeps the last value unless the key ends in [], and Express returns an array. The JSON output uses an array for repeated keys.
Is a plus sign a space or a plus?
In a query string, + means a space, because the query is encoded as application/x-www-form-urlencoded. In a path it is a literal plus. A literal plus inside a value must be written as %2B, otherwise it is read as a space. The tool marks values that contain a plus so you can check which one was meant.
Why does a value show a warning about double encoding or invalid UTF-8?
%2520 is a percent sign that was encoded again (decoded once it gives %20, which is a space written as an escape), so the value went through an encoder twice. Invalid UTF-8, such as %E9 for é, means the sender used Latin-1 instead of UTF-8. A % that is not followed by two hex digits is kept as typed.
Can it remove utm_ and other tracking parameters?
Yes. It recognises utm_*, gclid, gbraid, wbraid, fbclid, msclkid, dclid, yclid, twclid, ttclid, mc_cid, mc_eid, _ga, _gl and a few more. You can remove them, sort the remaining parameters by key and copy the cleaned URL. Parameters you did not touch keep their original encoding.
What does the URL parser extract besides the query?
Scheme, username and password, host (also shown in Unicode for internationalized names), port, path split into decoded segments, query, fragment and origin. It also tells you when a default port was dropped, when an IPv4 address was written in hex or octal, when the fragment holds its own ?query and when credentials are embedded in the URL.
Does it accept a URL without http:// or a host with a port?
Yes. example.com/path and //cdn.example.com/a.js are read as https URLs and the tool says that the scheme was assumed. localhost:3000 and example.com:8080 are treated as a host and a port, not as a scheme. Schemes such as mailto: and tel: are kept as they are.
Can I build a URL from its parts?
Yes. The builder takes scheme, host, port, path, query, fragment and optional credentials and encodes each part the way the URL standard does, so spaces in the path become %20 and an @ in a username becomes %40. A port equal to the default for the scheme is left out.
Is the URL sent to a server?
No. Parsing, cleaning and building run in your browser with the built-in URL API and a small decoder written for this page. Nothing is uploaded or stored, which matters for links that contain tokens, session ids or internal host names.