URL Parser

Break any URL into protocol, host, path, query and fragment.

URL Parser tool

About the URL Parser

Long web addresses packed with tracking codes and encoded characters are hard to read and debug. This URL parser splits any address into its parts: protocol, host and port, path, query string, fragment and origin. Every query parameter is listed separately with its decoded value, which makes it easy to check campaign tags, spot a broken redirect or understand what a link actually contains before you click it. Developers use it to debug routing and API calls, and marketers use it to audit links. Parsing happens in your browser, so private links containing tokens are never sent anywhere. To build tagged links, use the UTM Builder, and to strip tracking parameters, the URL Cleaner.

Marketing links are where this helps most. A campaign address can easily carry ten or twelve parameters glued together with ampersands, and reading them by eye invites mistakes. Laid out as rows, it becomes obvious which parameters have values, which are blank and which were percent-encoded twice by a careless redirect.

The breakdown comes from the same URL code your browser uses whenever you click a link, so it agrees exactly with how a browser would understand the address, even for unusual or badly formed links that confuse simpler tools. That includes details people often forget, such as default ports being left out and international domain names being converted to their punycode form. Seeing each part separately also makes it easy to spot a wrong domain or an unexpected parameter in a suspicious link.

How to use the URL Parser

  1. Paste the addressAny web address works, from a short homepage link to a long tracking URL; if the scheme is missing, https is assumed.
  2. Run the parserIts components are laid out in a table below the input.
  3. Go through the parametersEach query parameter gets its own row, with percent-encoded characters such as %20 turned back into readable text.
  4. Copy what you needTake the whole breakdown or a single value from the table.

URL Parser features

  • Scheme, host, hostname, port, path, query, fragment and origin
  • Each query parameter shown separately and decoded
  • Parameters that appear more than once listed individually
  • https added automatically when the scheme is missing
  • Clear message when an address cannot be understood
  • Full breakdown copied as plain text

Common uses

  • Checking the UTM tags on an advertising link
  • Seeing which port and path an API request really targets
  • Following the hops of a redirect chain
  • Pulling one value out of a very long address
  • Teaching the anatomy of a web address

URLs in practice: campaign links, percent-encoding, arrays in query strings, canonical URLs and phishing tricks

By the FreeToolsWorld editorial team · Updated November 2026 · How we write and check our guides

Every link carries structured information: where to go, which page to show, what options to apply and sometimes who sent you. Breaking a URL into its parts makes tracking links readable, helps debug web applications and exposes some common phishing tricks. This guide works through a campaign link, explains percent-encoding and query conventions, and covers internationalised domains, canonical URLs for SEO and security.

A worked example: a campaign link

Consider a link from an advertisement:

  • https://shop.example.pk/products/kurta?utm_source=facebook&utm_medium=cpc&utm_campaign=eid_sale&color=blue#reviews

The protocol is https, the host is shop.example.pk and the path is /products/kurta. The query string contains three UTM parameters telling analytics tools that the visitor came from a paid Facebook ad in the Eid sale campaign, plus a color parameter the shop uses to preselect blue. The fragment, reviews, scrolls the page to the reviews section and is never sent to the server.

Percent-encoding

URLs can contain only a limited set of characters, so others are percent-encoded: a space becomes %20, an ampersand inside a value becomes %26 and Urdu letters become sequences of bytes such as %D9%84. Forgetting to encode an ampersand in a value splits it into two parameters, a common source of bugs when building links by hand.

Repeated keys and arrays

There is no single standard for lists in query strings. Some systems repeat a key, as in size=m&size=l, others use brackets, as in size[]=m&size[]=l, and others separate values with commas. The server's framework decides how these are read, so check its documentation when an array arrives as a single value.

Fragments and single-page apps

Because fragments stay in the browser, older single-page applications used them for routing, producing URLs with #/ in them. Modern applications usually use the History API to create clean paths instead. Fragments remain useful for linking to sections of a page.

Canonical URLs and SEO

The same page can often be reached through many URLs: with or without a trailing slash, with tracking parameters, or in upper and lower case. Search engines may treat these as duplicates. Websites declare a canonical URL for each page and keep internal links consistent, so ranking signals are not split across variations.

Internationalised domain names

Domain names can contain non-Latin characters, which are converted behind the scenes to an ASCII form called punycode, beginning with xn--. Attackers sometimes register look-alike domains using characters that resemble Latin letters, which is why browsers may display the punycode form for suspicious mixes of scripts.

A phishing trick to recognise

Text before an @ sign in the host part of a URL is treated as login information, not the destination. A link such as https://yourbank.com@evil.example/login actually goes to evil.example. Parsing a suspicious link shows its real hostname immediately, which is a quick way to check links received by email or message.

Length limits

The URL standard sets no fixed maximum length, but browsers, servers and proxies impose practical limits, and very long URLs can be truncated. Keeping URLs reasonably short, and moving large amounts of data into request bodies, avoids problems.

Common mistakes

  • Building query strings without encoding values.
  • Assuming the fragment reaches the server.
  • Letting tracking parameters create duplicate pages for search engines.
  • Trusting the beginning of a link without checking its real host.

Related tools

To encode or decode parts of a URL, use URL Encoder. For UTM campaign links, try UTM Builder, and to strip tracking parameters, URL Cleaner.

Building URLs in code

Rather than joining strings, most languages provide URL builders that encode values correctly, such as the URL and URLSearchParams objects in JavaScript. They prevent errors with spaces, ampersands and non-Latin characters and make code easier to read than manual concatenation.

Short links and redirects

Short links and redirect services hide the final destination until clicked. Checking where a short link leads, using a link-expanding service, shows the real destination before visiting it, a sensible precaution with links from unknown senders.

Tracking parameters and privacy

Tracking parameters reveal where you clicked a link and sometimes who shared it. Removing UTM tags and similar parameters before passing a link on keeps it shorter and avoids sharing tracking information unnecessarily.

Ports in development

During development, applications often run at addresses such as localhost:3000, where the number after the colon is the port. Production sites usually use the default ports, 443 for https and 80 for http, which browsers hide. Mismatched ports are a common reason for blocked requests during development.

Relative links

Links inside a website are often relative, such as ../images/logo.png or /about, and the browser resolves them against the current page's address. A link that works on one page can break on another if it is relative to the wrong folder, so absolute paths starting with a slash are often safer for site-wide navigation.

Privacy

URLs are parsed in your browser and are never visited or sent anywhere.

Frequently asked questions

Why is the port usually blank?

Browsers only report a port when the address spells one out. Secure sites listen on 443 and plain ones on 80 by convention, and those defaults are understood without being typed, leaving the field empty for nearly every link you check.

What separates host from hostname?

Hostname is just the domain name. Host is the domain name plus a port number, when the address includes one. On an ordinary https address with no port, the two values are identical.

What happens when a parameter name appears twice?

Every occurrence is listed on a separate line, following the order in the link. That matters, because some frameworks read the first value, others read the last and some collect them all into a list.

Does the part after the # reach the server?

No. Everything after the hash is kept by the browser and left out of the request, so web apps and jump links rely on it to remember a position or a view without the server ever knowing.

Can I parse a relative link such as /blog/post?

Not by itself, because it has no scheme or host for the parser to work from. Add the domain in front, for example https://example.com/blog/post, and the rest of the address is broken down normally.

Does the tool open the address I paste?

No. It only reads the text of the address and never sends a request to it, so you can safely inspect private links, internal addresses and links containing access tokens.