URL Parser
Paste any URL and see every part extracted — protocol, subdomain, host, port, path segments, query parameters, hash, and TLD. Instant visual breakdown.
Use this with
Related dev utilities tools
URL Anatomy Guide
Understand exactly what's in a URL
URLs are deceptively complex. Behind that one-line string is a protocol, authentication, host, port, path, query, and fragment — each with rules about what's allowed. Parsing makes those parts explicit so you can debug routing, redirects, tracking, and bugs with confidence.
Protocol
The scheme before '://' — usually https. For SEO, always https. Mixed http/https on the same site causes security warnings and duplicate-content issues.
Subdomain vs second-level domain
In 'blog.example.com', 'blog' is the subdomain and 'example' is the second-level domain. SEO treats them as separate sites for ranking purposes — moving between them requires careful redirects.
TLD detection
Top-level domain: com, org, co.uk, io. Some TLDs are multi-part (co.uk, com.au) — our detection works for single-part TLDs correctly; co.uk sites need careful interpretation.
Path segments
Each /-separated portion of the path. Useful for routing logic, URL audits (how deep is this page?), and sitemap structure analysis.
Query parameters
Parsed into key/value pairs. We show every param — including tracking UTMs, filters, pagination, and session IDs. Useful for spotting URL pollution and duplicate-content sources.
Hash / fragment
Everything after #. Not sent to the server — purely client-side (anchor links, SPA routing). For SEO, hash-based URLs are treated as the same page — Google ignores the hash.
Pro Tips
Origin includes the protocol and port (https://example.com:8080). Host is just name:port. When you see CORS errors, they're usually about mismatched origins, not hosts.
URLs with the default port for their protocol (80 for http, 443 for https) show port as blank. Custom ports always appear explicitly.
Special characters in query values are URL-encoded (spaces → %20, & → %26). When debugging, decode values before interpreting them.
Frequently Asked Questions
- What if the URL is missing the protocol?
- The parser requires a valid absolute URL — including https://. If you're working with relative paths, prefix with any https:// host first to parse, then strip that off.
- Why doesn't my co.uk domain parse correctly?
- Our TLD detection treats the last dot-separated portion as the TLD. For multi-part TLDs (co.uk, com.au), the 'secondLevelDomain' shows 'co' instead of the real root. For ETLD+1 accuracy, use a public suffix list library.
- Does this work on internal URLs (localhost)?
- Yes. Any valid URL parses — http://localhost:3000/api parses just fine. TLD detection returns 'localhost' as the TLD.
- What's the difference between 'host' and 'hostname'?
- host includes the port if specified (example.com:8080); hostname is always just the name (example.com). When writing code that cares about the port, check host; when you only care about the site identity, use hostname.