URL Parser & Query String Decoder

Break a URL into protocol, host, path, params and hash — decoded and presented as JSON.

convert² THE BEAUTIFIER
Enter format · K copy
INDENT
Input · raw
0 B 0 ln
1
Output · formatted
0 B 0 ln
{ }
awaiting input
paste code on the left
pick a format above
Original · A
0 B
Removed raw
Added
Original · B
0 B
↓ About this tool

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

  1. Paste the URL into the left pane.
  2. Structured output appears on the right as JSON — protocol, host, pathname, params object, hash.
  3. Percent-encoded characters (%20, %2F, %3A) are decoded.
  4. Keys repeated in the query string become arrays.

Example

Input
https://example.com/search?q=json%20beautifier&tag=dev&tag=tools&page=2#results
Output
{
  "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 URL and URLSearchParams — 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 jq or feed into another tool.

Common use cases

  • Debugging an OAuth redirect that includes an access_token in 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 params object.
  • Missing port returns null.
  • Hash fragment is kept as-is (including the leading #) — or null if absent.
  • Input must be a complete URL with scheme. Schemeless strings like example.com/foo are 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.

Other tools

copied