URL Parser Online
| Part | Value |
|---|
A URL is nine parts pretending to be one string - and the bugs live in the boundaries. This parser uses the browser’s native URL constructor, the same parser fetch() and <a> use, so what it shows is what the platform sees: protocol, host, port, path, every query parameter percent-decoded, and the client-only fragment.
The chips demonstrate the traps: an encoded slash inside a parameter value, a non-default port, and a mailto: URL whose hostname is not a host at all.
How to use
- Paste a URL; the table labels every part with decoded query values (a%2Bb shows as a+b).
- Watch the port row: default ports (443 for https, 80 for http) display as default because the browser erases them.
- Invalid or relative URLs fail with the same error the platform throws - relative ones need a base to resolve against.
Frequently asked questions
Why does my relative URL throw an error?
The URL constructor requires an absolute URL - something://host/path. Relative paths like /search need a base: new URL(path, origin). The tool passes your input as-is, so it reports the same TypeError the platform would - which is the point: it shows platform truth, not a lenient imitation.
What is the difference between the query and the fragment?
Everything before # travels to the server; everything after it never leaves the browser. That is why analytics parameters live in the query (search) while in-page anchors and single-page-app routes live in the fragment (hash) - and why stripping the fragment never changes what a server receives.
Why did my port disappear?
The URL API erases default ports: https keeps no 443 and http keeps no 80 in its port field. A URL with an explicit :443 parses identically to one without - the port row in the table shows default when the browser would treat it as absent.
Are query parameter names case-sensitive?
Yes - the URL spec leaves query interpretation to the server, and by convention names are case-sensitive: ?Page=2 and ?page=2 are different parameters. The parser shows them exactly as sent, decoded for readability but never normalized.