PK Systems PK Systems
Web & marketing

URL Parser

Decompose any URL into protocol, host, port, path, query and fragment — with IDN punycode decoding and query-pair extraction. Runs entirely in your browser.

URL Parser

Paste any URL. Both ASCII and internationalised hosts are supported.

Components

Query parameters

KeyValue

No query parameters.

Normalised URL

What is a URL parser?

A URL parser splits a Uniform Resource Locator into the labelled pieces defined by RFC 3986: scheme, optional userinfo, host (with optional port), path, query and fragment. Every browser, server, proxy, CDN and link-checker has to do this internally before it can route or rewrite a request. Seeing the breakdown explicitly makes it easy to spot encoding bugs, misplaced slashes, accidental credentials in URLs, and IDN homograph attacks.

How to use this parser

Paste a URL into the box. The components panel updates instantly. Look at the host row to see whether punycode is in play (a host starting with xn-- is IDN-encoded), check the port row to confirm whether the URL is using the protocol's default, and scan the query parameters table to see exactly which keys and values would arrive at the server. The normalised URL row shows what the URL looks like after the browser's parser cleans it up — uppercase scheme lowercased, default port stripped, percent-encoding tidied.

Why fragments don't reach the server

The fragment — the part after # — is reserved for the user agent. Browsers strip it before sending the HTTP request, which is why the server (and your access logs, and your analytics tools' raw landing-page data) can't see it. Single-page apps abuse this on purpose to make navigation feel instant: route changes update the fragment instead of triggering a real network request. If you need a value to reach the server, put it in the query string, not the fragment.

URL anatomy

Part Example Role
protocolhttps:Tells the client which protocol to speak.
hostshop.example.comThe server to connect to. Can be a domain name or an IP literal.
port8443TCP port. Default is 80 for http, 443 for https.
path/cart/checkoutResource path on the server. Always starts with /.
query?id=42&ref=hpOptional key/value pairs after the ?.
fragment#paymentClient-side anchor after the #. Never sent to the server.

Frequently asked questions

Does this tool send my URLs anywhere?
No. Parsing uses the browser's built-in URL constructor; nothing is uploaded. Open DevTools > Network and you'll see no requests fire as you type.
What is punycode?
Punycode is the ASCII-only encoding for internationalised domain names. münchen.de on the wire is xn--mnchen-3ya.de. The parser shows both forms so you can spot homograph attacks where a malicious host disguises itself as a familiar brand.
Why does the parser show userinfo if I paste a URL with credentials?
Because RFC 3986 still defines that syntax. Browsers display a warning and strip credentials before navigation, but plenty of CLI tools, scrapers and legacy SDKs accept them. Treating any URL with userinfo as suspicious is a sensible default in code review.
Are repeated query keys preserved?
Yes. ?tag=a&tag=b shows both rows. How a server interprets duplicates is framework-dependent — PHP keeps the last value by default, Node.js's URLSearchParams returns an array. The parser doesn't deduplicate; it shows what's actually in the URL.
What gets percent-decoded?
Each component is shown decoded for readability, but the normalised URL keeps the canonical percent-encoded form so you can paste it back into code without round-tripping through unsafe characters. Spaces, slashes and reserved characters stay encoded where required.
Can I parse mailto: or tel: URLs?
Yes — any URL the browser's URL constructor accepts. For mailto: the address sits in the path, headers like ?subject= show up as query parameters. For more advanced mailto building, see our dedicated mailto link generator.