URL Parser — Parse URLs into Components in Your Browser
Parse URLs into their components — scheme, host, port, path, query, fragment. RFC 3986 compliant, runs locally. No uploads, no signup.
URL Parser
Parse URLs to extract protocol, hostname, path, query params, and more.
A URL looks like a single string but is actually six independent components glued together by a syntax that has been stable since 2005. The scheme tells the browser what protocol to use, the authority says where to send the request, the path picks the resource, the query adds parameters, and the fragment points to a section within the response. Every web developer can name those components, but far fewer can correctly parse a URL that includes a userinfo (user:pass@host), an IPv6 address ([::1]:8080), or a port that disagrees with the scheme. The URL parser removes the guesswork: paste a string, get the structured breakdown, and know which component is wrong.
The most common sources of URL bugs are the interactions between components that look like one thing but are actually another. A port 8080 in a URL with scheme https works at the network layer but breaks certificate validation because TLS expects port 443. A fragment #/route looks like a client-side route but the browser strips it before the HTTP request leaves the machine. A path /foo/../bar is resolved by the HTTP client to /bar before the server sees it. The parser does not resolve these interactions — it displays each component as written — but the separate display makes the interaction visible in a way that a single-line URL string does not.
For a final hand-off: if the query string needs structured parsing, feed the query component into the Query String Parser tool on this site for JSON output. If the URL is part of a larger HTTP debugging session, pair the parser with the HTTP Headers Parser and cURL-to-Python tools to trace the full request chain from URL to wire format. For batch URL inspection during a site migration, copy the whole list and parse each URL individually — the structured output makes diffing two versions of the same URL straightforward.
How to use
Paste a URL
Drop any URL into the input — absolute (https://example.com/path?q=1#top), relative (/path/to/resource), or protocol-relative (//cdn.example.com/lib.js). The parser breaks it into structured components.
Inspect each component
Scheme, authority (userinfo, host, port), path, query string, and fragment are shown in separate fields. The host is further split into subdomain, domain, and TLD for quick reference.
Copy the parsed JSON
Click 'Copy as JSON' to get the structured output for use in scripts or debugging. Each component is a top-level key with the raw string value from the URL.
Frequently asked
Does the parser handle malformed or partial URLs?
Yes. The parser uses the WHATWG URL Standard for web URLs and falls back to RFC 3986 for non-browser URLs. Malformed URLs are flagged with a warning showing which component failed to parse. Partial URLs like `/api/users` are parsed as path-only with no scheme or authority.
What is the difference between the host and the hostname?
The host includes the port (`example.com:8080`), while the hostname is just the domain (`example.com`). The port is displayed as a separate field. If the URL omits the port, it is inferred from the scheme (80 for HTTP, 443 for HTTPS) and shown in parentheses.
How are query parameters handled?
The raw query string is displayed as-is (`q=hello&page=1`). For structured parameter extraction, use the Query String Parser tool, which parses the query into a JSON object with array handling, nested key support, and duplicate-key merging.
What happens to URL-encoded text in the parsed output?
The parser displays the decoded form of each component. A path of `/my%20file` is shown as `/my file` and the original encoded form is preserved in a separate 'raw' field. This lets you inspect both the human-readable and the wire-format versions side by side.
Limitations
- No punycode-to-Unicode domain conversionInternationalised domain names like `xn--mnchen-3ya.de` are displayed in their Punycode form. The Unicode form is not recoverable without a separate IDN library because the encoding is lossy.
- No URL normalisationThe parser does not normalise URLs (e.g. resolve `../` segments, squash duplicate slashes, decode over-encoded characters). It parses the URL exactly as written.
- No redirect-following or DNS resolutionThe tool is a pure syntax parser. It does not resolve hostnames, follow redirects, or validate that the URL points to a real resource.
Platform notes
- macOS
- The built-in `NSURLComponents` in Foundation does much the same thing, but requires Swift or Objective-C. The browser tool is the right pick for inspecting URLs copied from a Safari address bar without writing code.
- Linux
- CLI equivalent: `python3 -c 'from urllib.parse import urlparse; print(urlparse("https://example.com"))'`. The browser tool is the right pick for ad-hoc inspection when copying from a chat or docs page.
- Windows
- PowerShell's `[System.Uri]` class parses URLs with the same RFC 3986 rules but requires a .NET runtime. The browser tool runs with zero dependencies and works offline.
- Web
- Runs entirely client-side. Useful for debugging URLs during API development — paste a URL from a console error log and see exactly which component is malformed.