Skip to content
T
Tools.Town
Free Online Tools for Everyone
https://…/path?q=1

URL Parser

100% Free

Break any URL into protocol, host, port, path, query parameters, and fragment — with subdomain, domain, and TLD detection. Parses live in your browser.

Full Breakdown
Domain & TLD
Live Parse
100% Client-Side
Normalised URL

https://user:pass@www.example.co.uk:8080/blog/post?q=hello%20world&page=2#section

Scheme

https

Host

www.example.co.uk:8080

Hostname

www.example.co.uk

Port

8080

Subdomain

www

Domain

example.co.uk

TLD

co.uk

Path

/blog/post

Fragment

section

Username

user

Query parameters (2)

Decoded query parameters
KeyDecoded value
qhello world
page2

Path segments

blogpost

Embed This Tool

Easy to Embed

Add URL Parser to your website or blog in seconds.

  • Responsive design
  • Lightweight & fast
  • No backend required
  • Always up-to-date
<iframe
  src="https://tools.town/embed/url-parser/"
  width="100%"
  height="600"
  style="border:none; border-radius:12px;"
  loading="lazy"
  title="URL Parser">
</iframe>

Share This Tool

Share Instantly

Share URL Parser with anyone — no login required.

  • Shareable link
  • No login required
  • Works on any device
  • No account needed

Share via

Advertisement

How to Use

  1. 1 Paste or type any URL into the input box — absolute or scheme-less
  2. 2 The parser instantly breaks it into protocol, host, port, path, query, and fragment
  3. 3 Review the decoded query parameters in a clean key-value table
  4. 4 See derived data: subdomain, registrable domain, and top-level domain (TLD)
  5. 5 Copy the full parsed result as JSON for use in code or tests

Features

  • Splits a URL into all WHATWG components: scheme, username, host, port, path, query, fragment
  • Detects subdomain, registrable domain, and TLD — including multi-part TLDs like co.uk
  • Decodes every query parameter into a readable key-value table
  • Recognises IPv4 and IPv6 host literals and labels them
  • Assumes https:// for scheme-less input so partial URLs still parse
  • 100% client-side — nothing you paste is uploaded or stored

Why it Matters

A URL packs six or more distinct pieces of information into a single string, and a misplaced slash or unencoded character can change which one a server sees. Parsing a URL into its parts makes debugging redirects, tracking links, and API calls fast and certain. Doing it in the browser means even URLs with credentials or tokens never leave your machine.

★★★★★

Use Cases

API Debugging

Confirm exactly which host, path, and parameters a request will hit

SEO & Redirects

Inspect subdomain, domain, and path structure when auditing links

Tracking Links

Decode UTM and campaign parameters embedded in a marketing URL

Security Review

Spot embedded credentials, unusual ports, or suspicious hosts in a link

What this tool does

The URL Parser takes any URL and breaks it into every component the web platform defines: scheme, userinfo, host, port, path, query string, and fragment. On top of that it derives the subdomain, registrable domain, and top-level domain (TLD), decodes the query parameters into a clean key-value table, and splits the path into its segments.

Why parse a URL?

URLs are dense. A single string can carry a protocol, credentials, a host, a non-standard port, a deep path, a dozen tracking parameters, and an in-page anchor. When a redirect misbehaves or an API call hits the wrong endpoint, seeing the URL broken into labelled parts turns guesswork into a quick read.

How the domain split works

For www.example.co.uk, a naïve split on dots would treat uk as the domain. The parser instead recognises common multi-part public suffixes (co.uk, co.in, com.au, and others), so it reports the subdomain as www, the domain as example.co.uk, and the TLD as co.uk.

Privacy

Everything runs locally in your browser using the standard URL API. Nothing you paste is uploaded, logged, or stored — safe even for URLs that contain access tokens.

Frequently Asked Questions

What are the parts of a URL?
A full URL has up to six main parts: the scheme (https), an optional userinfo (user:pass@), the host (www.example.com) with an optional port (:8080), the path (/blog/post), the query string (?q=hello), and the fragment (#section). This parser breaks any URL into all of these and also derives the subdomain, registrable domain, and TLD.
What is the difference between hostname, host, and domain?
The hostname is just the host name (example.com). The host includes the port if one is present (example.com:8080). The domain is the registrable part — for www.example.co.uk the parser reports a subdomain of 'www', a domain of 'example.co.uk', and a TLD of 'co.uk'.
Does it handle URLs without https:// at the front?
Yes. If you paste a scheme-less string like example.com/path, the parser assumes https:// so it can still break the URL into components, and it flags that it made that assumption.
Are multi-part TLDs like co.uk handled correctly?
Yes, for common ones. The parser knows a curated list of two-part public suffixes (co.uk, co.in, com.au, co.jp, and others) so the domain and TLD split correctly. It is a heuristic, not the full Public Suffix List, but it is accurate for everyday domains.
Is my URL sent anywhere?
No. Parsing runs entirely in your browser using the built-in URL API. Nothing you paste — including URLs that contain tokens or credentials — is ever uploaded, logged, or stored.

Related Tools You Might Like

Browse more free tools