URL Parser
Paste a full URL and this tool splits it into protocol, username, password, origin, host, hostname, port, pathname, search and hash using the browser's built-in URL engine. Each part sits in its own row with a copy button, and every query parameter is decoded and listed separately below. It updates the instant you type, with no button to press.
How to parse a URL
- Paste an absolute URL such as https://example.com/path?a=1 into the URL box.
- Watch the components table fill in with Protocol, Origin, Host, Hostname, Port, Pathname, Search, Hash and more.
- Scroll to the Query parameters table to see each key and value on its own row, already decoded.
- Click the copy icon beside any single part to grab just that value.
- If a red error appears, add a scheme like https:// or fix the URL, since relative paths cannot be parsed alone.
Examples
A URL with auth, port, path, query and hash
https://user:pass@example.com:8080/a/b?x=1&y=2#top
username: user, password: pass, host: example.com:8080, hostname: example.com, port: 8080, pathname: /a/b, params: x=1 and y=2, hash: #top
A search URL with a percent-encoded space
https://shop.example.com/search?q=blue%20shoes&page=2
origin: https://shop.example.com, pathname: /search, params: q=blue shoes (decoded from %20) and page=2
Repeated keys and a fragment
https://api.example.com/items?tag=a&tag=b#list
params: tag=a and tag=b listed as two rows, hash: #list, port: empty
Frequently asked questions
What counts as a valid URL here?
An absolute URL with a scheme, such as https://example.com. Relative paths like /about have no host, so the parser cannot resolve them on their own and shows an error asking for a scheme.
What is the difference between host and hostname?
Hostname is just the domain, like example.com. Host includes the port when one is present, like example.com:8080. When there is no explicit port, host and hostname read the same and the Port row is empty.
How are repeated query parameters handled?
Each key becomes its own row, so a=1&a=2 shows two entries. The original order is preserved and every value is kept, which matters for APIs that read multiple values for the same key.
Does it decode percent-encoded values?
Yes. Parameter keys and values are shown decoded, so %20 appears as a space and other escapes are resolved. A plus sign in a query is also read as a space, matching how form data is encoded.
Can it parse mailto, ftp, ws or custom schemes?
Yes. Any scheme the URL standard accepts will parse. Some schemes like mailto do not use a host, so the Host and Hostname rows may be empty while the Pathname holds the address or resource.
What does the origin row mean?
Origin is the scheme plus the host and port, for example https://example.com:8080. Browsers use it as the security boundary for same-origin checks, so it is handy when debugging CORS or cookie scope.
Does it show the username and password if present?
Yes. If the URL contains userinfo like user:pass@host, both are extracted into their own rows. Putting credentials in a URL is discouraged, but the parser surfaces them so you can spot and remove them.
How are internationalized domain names handled?
The URL engine normalizes non-ASCII hostnames to their punycode form, so a Unicode domain shows as an xn-- label. That is the same value browsers and DNS actually resolve.
Is my URL sent anywhere?
No. Parsing happens entirely in your browser using the standard URL engine, and nothing is uploaded. Even a link with tokens or credentials stays on your device.
Learn more
- The anatomy of a URL, part by part
A plain guide to every piece of a URL, from scheme and host to path, query and fragment, and how a parser separates them cleanly.
Related tools
Query String Parser
Parse a URL query string into key value pairs or JSON, and build one from pairs. Handles repeated keys, encoded characters and empty values.
URL Encoder
Encode or decode URLs and query strings online. Percent-encode a value, escape a full URL, or decode back to plain text. Free, fast and private.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.