URL Parser & Query String Decoder
Break a URL into protocol, host, path, params and hash — decoded and presented as JSON.
What it does
A long URL with a dozen query parameters and percent-encoded values is hard to read. Splitting it into its parts — protocol, host, path, params, fragment — makes debugging tracking URLs, OAuth callbacks or search pages much easier.
convert2 uses the browser's native URL API, so whatever browsers accept, this tool accepts. Percent-encoded characters are decoded. Repeated query keys are collected into arrays.
How to use it
- Paste the URL into the left pane.
- Structured output appears on the right as JSON — protocol, host, pathname, params object, hash.
- Percent-encoded characters (
%20,%2F,%3A) are decoded. - Keys repeated in the query string become arrays.
Example
https://example.com/search?q=json%20beautifier&tag=dev&tag=tools&page=2#results
{
"protocol": "https",
"host": "example.com",
"hostname": "example.com",
"port": null,
"pathname": "/search",
"hash": "#results",
"params": {
"q": "json beautifier",
"tag": ["dev", "tools"],
"page": "2"
}
}
Why convert2
- Native parsing. Uses the browser's
URLandURLSearchParams— the same parser the browser uses when following a link. - Decodes safely. Percent-encoded characters become readable.
- Private. Analytics URLs, OAuth callbacks, deeplinks often carry tokens — keep them local.
- JSON output. Pipe the result into
jqor feed into another tool.
Common use cases
- Debugging an OAuth redirect that includes an
access_tokenin the fragment. - Inspecting UTM parameters on marketing URLs.
- Reading the actual structure of a deep-linked SPA URL.
- Pulling the real target out of a tracker-wrapped link.
URL Parser specifics
- Empty query strings become an empty
paramsobject. - Missing port returns
null. - Hash fragment is kept as-is (including the leading
#) — ornullif absent. - Input must be a complete URL with scheme. Schemeless strings like
example.com/fooare treated as invalid.
Frequently asked questions
Does it decode URL-encoded characters?
Yes. All percent-encoded sequences (%20, %2F, %3A and the rest) are decoded into their original characters.
Can it handle multiple values for the same query key?
Yes. Repeated keys like ?tag=a&tag=b come through as an array.
What about relative URLs?
Input must be a full URL with scheme. convert2 does not resolve relative URLs against a base.