What is a URL parser?
A URL parser takes a link and splits it into its parts: the protocol, the host, the port, the path, the query string, and the fragment. Paste in https://www.example.com:8080/docs/guide?search=hello&lang=en#section-2 and it shows you https: as the protocol, www.example.com:8080 as the host, 8080 as the port, /docs/guide as the path, ?search=hello&lang=en as the query, and section-2 as the fragment. Six pieces, each labelled, each exact.
Every link you have ever clicked is built from those pieces, and most of the time you never need to see them — the browser handles them quietly. But when a link breaks, when an API call fails, or when you are building a link by hand, the pieces are what you need to look at. A parser shows them without you having to take the link apart by eye, which is slow and easy to get wrong.
This parser uses the same tool your browser uses: the built-in URL constructor. It reads a link the way a browser reads it, so what it shows is what the browser would actually do with that link. If the link is not valid, it says so plainly instead of guessing — a broken link gets dashes, not made-up parts.
It runs entirely in your browser. Nothing is uploaded, nothing is stored, and there is no account to create. A link is just text, and a parser has no business collecting it.
The parts of a URL, piece by piece
The protocol comes first, and it says how the browser should fetch the page. https: means a secure connection, http: means an insecure one, and ftp:, mailto:, and file: are other protocols for other jobs. The default link on this page uses https:, which is what almost every site uses now. If a link has no protocol at all, it is not a full URL — it is a relative link, and a parser will refuse it.
Next is the host, which is the domain plus the port when one is given. In the default link the host is www.example.com:8080 — the domain www.example.com and the port 8080, joined by a colon. The port is the door the server listens on: 443 is the usual door for https, 80 for http, and 8080 is a common door for development servers. When no port is written, the browser uses the default for the protocol, and this parser shows a dash for the port — because no port was written, not because there is none.
Then comes the path, which says which page or file on the server you want. In the default link it is /docs/guide — two folders, docs and guide, with no file name at the end, so the server will serve its default page for that folder. A path always starts with a slash, and every slash is another level down.
The last two pieces are the query and the fragment, and they do different jobs. The query, ?search=hello&lang=en, is data sent to the server — here, a search for 'hello' in English. The fragment, section-2, is data for the browser only — it tells the browser to jump to the part of the page called section-2, and it is never sent to the server at all. The next section looks at both in detail.
The query string and the fragment, explained
The query string starts with a question mark and holds key-value pairs joined by ampersands. In the default link, ?search=hello&lang=en is two pairs: search=hello and lang=en. The server reads them and acts on them — a search page searches for 'hello', a language switcher switches to English. The order of the pairs does not matter to most servers, but the spelling does: 'search' and 'Search' are different keys.
Values in a query string are encoded, because a query string cannot contain spaces or certain characters raw. A space becomes %20, an ampersand becomes %26, and a plus becomes %2B. That is why a search for 'hello world' appears in a link as search=hello%20world — and why a value containing an ampersand must be encoded, or it would be read as the start of a new pair. An URL encoder-decoder handles that encoding for you.
The fragment starts with a hash and is the browser's business, not the server's. When you open a link with #section-2, the browser downloads the page, then scrolls to the element whose id is section-2. The server never sees the fragment — it is stripped from the request before the request is sent. That is why a fragment cannot change what the server returns, only where the browser lands on the page.
A common confusion is the difference between the query and the fragment. The query changes what the server sends back; the fragment changes where the browser looks on the page it got. If a link's search results are wrong, the query is the suspect. If the page loads but lands in the wrong place, the fragment is the suspect. The parser shows both separately so you can tell at a glance.
A worked example: a full URL taken apart
Take the default link exactly as it sits on the page: https://www.example.com:8080/docs/guide?search=hello&lang=en#section-2. The parser shows protocol https:, host www.example.com:8080, port 8080, path /docs/guide, query ?search=hello&lang=en, and fragment section-2. Every piece is there, and every piece is in the right row.
Now try a plain link: https://sortrun.com/tools. The parser shows protocol https:, host sortrun.com, port dash, path /tools, query dash, fragment dash. Three dashes, and each one means something: no port was written, so the browser will use 443; no query was written, so nothing is sent to the server; no fragment was written, so the browser lands at the top of the page. A dash is not missing data — it is the absence of that piece, stated plainly.
A third case shows what happens with a broken link. Type 'ht tp://bad' and every row shows a dash, because the link is not a valid URL at all — the space in the protocol breaks it. The parser does not guess, and it does not show half an answer. If a link fails here, it will fail in a browser too, and the fix is to correct the link, not to argue with the parser.
One more case worth trying: a link with a username and password, such as https://user:pass@example.com/. The parser's host row shows example.com, and the user and password do not appear anywhere — this tool does not display credentials, because a link with a password in it should never be pasted into a page you do not trust. If you see credentials in a link, that link is a security problem, not a curiosity.
Who parses URLs, and why
Web developers parse URLs every day. When an API call returns an error, the first thing to check is the URL — is the host right, is the path right, is the query carrying the values the API expects? A parser shows all six pieces at once, so a wrong port or a missing slash is visible in seconds instead of hiding in a long string.
Support staff parse URLs when a customer reports a broken link. The customer pastes the link, the parser splits it, and the fault is usually obvious: a wrong domain, a doubled slash, a query value with a space in it that was never encoded. The parser turns a vague report — 'the link does not work' — into a specific one: 'the host is wrong'.
SEO and marketing people parse URLs for a different reason: the structure of a link is part of how a site is understood. A clean path like /docs/guide tells a reader and a search engine what the page is about; a path full of numbers and parameters tells them nothing. A sitemap generator lists a site's URLs in one place, and a parser is the tool for reading any one of them closely.
Then there is the security use. A link that looks like a bank's link but points somewhere else is the oldest trick in phishing, and the host row is where the trick shows: the link text says 'bank', but the host says something else entirely. Parsing a suspicious link before clicking it is one of the cheapest safety checks there is — and it takes less time than recovering a stolen password.
URL parser vs URL encoder-decoder
A parser and an encoder-decoder are neighbours, not twins. The parser splits a link into its six parts and shows them. The URL encoder-decoder changes how characters are written inside a link — turning a space into %20 and back again. One reads the structure, the other changes the spelling.
Use the parser when the question is 'what is in this link?' — which host, which path, which query values. Use the encoder-decoder when the question is 'how do I write this value inside a link?' — a search term with a space, a name with an ampersand, a value with a plus sign. The two tools answer different questions about the same link.
They also fail differently. A parser fails when the link itself is not valid — a space in the protocol, a missing host, a broken bracket. An encoder fails when the value contains characters that cannot be written raw. If your link is rejected by a server, parse it first: the fault is usually in the structure, not the spelling.
One more neighbour worth knowing: the robots.txt generator writes the file that tells search engines which paths on your site they may crawl — and the paths in that file are the same paths this parser shows. If you can read a URL's path here, you can write a robots.txt rule for it there.
Common URL mistakes
The most common mistake is a missing protocol. 'www.example.com/page' looks like a link, but without https: in front of it, it is not a full URL — it is a relative path, and pasting it into a parser or an API call will fail. Always start with https:// unless you have a reason not to.
Second: spaces in a link. A space is never allowed raw in a URL — it must be encoded as %20, or the link breaks. The default link's query, ?search=hello&lang=en, has no spaces, which is why it parses cleanly. A search for 'hello world' must be written search=hello%20world, or the parser will read 'world' as something else entirely.
Third: confusing the query with the fragment. A value after the hash is never sent to the server, so putting search terms after a # does nothing — the server never sees them. If a filter or a search is not working, check whether the value is before the question mark, where the server can read it, or after the hash, where it cannot.
Fourth: the wrong port. A development server on port 8080 and a live server on port 443 serve different things, and a link with the wrong port reaches the wrong server — or no server at all. If a link works on your machine and fails everywhere else, the port is the first thing to check. And fifth: trusting the link text instead of the host. The text of a link can say anything; the host row is the truth about where it goes.
How to use this URL parser
Using it takes a few seconds. Paste a link into the box — the default is a full example with all six parts — and the pieces appear instantly. Protocol, host, port, path, query, and fragment, each in its own row. A dash means that piece is absent, not that the parser failed.
To check a suspicious link, paste it and read the host row first. That is where a phishing link gives itself away: the text may say one thing, but the host is the real destination. To debug a broken API call, read the path and query rows — a missing slash or a wrong key is usually visible at once.
Everything runs in your browser, so nothing you paste is uploaded or stored. One practical tip: when you copy a link out of an email or a chat, check for a trailing full stop or bracket that got copied with it. A link ending in a full stop is a different link, and the parser will show it — the path row will end with a dot that should not be there.
If a link fails here, fix the link, not the tool. A space in the protocol, a missing host, or a stray character will fail in a browser too — the parser is simply telling you first. A meta tag generator can help with the page the link points to, once the link itself is sound. Once you have picked the URL apart, rebuild the clean version search engines should index with our canonical URL generator.