URL parser
Break a URL into its parts and decode every query parameter.
Nothing leaves your browser.
Parts
Paste a URL to see its parts.
Query parameters (0)
No query string.
What to watch
- Note: Paste a URL to break it apart.
How to use it
- Paste the URL. It stays in your browser.
- Read the parts, then the query parameters with their values decoded.
- Check the warnings for duplicated or double-encoded parameters.
- Use the encoder if you need to fix a value.
Where the parts matter
Protocol and host decide security and cookies. The path is what your routing matches. The query is what reaches your application as data, and the fragment reaches nothing at all.
Most URL bugs come from treating these as one string: a value containing a slash or an ampersand breaks a URL assembled by concatenation, and nothing complains until a destination is wrong.
Duplicates are undefined behaviour
Two systems appending the same parameter is common — a tracking template on top of a hand-tagged link. The standard does not say which one the server should read, so the answer differs by framework.
When you see a duplicate, fix the system that is appending, not the symptom.
Double encoding has a signature
Decode once, and a correctly encoded value becomes readable text. A double-encoded one still has escapes in it, which is how this page spots them.
The fix is almost always to stop encoding at the step that received an already-encoded value, rather than adding another decode further down.
The fragment never reaches the server
Everything after the # is handled by the browser alone. It is not in the request, not in server logs, and not available to server-side analytics — which is why single-page apps that route on the fragment need to report page views themselves.
Duplicate parameters are the other thing worth checking. A URL may legally carry the same key twice, and which one wins depends entirely on the framework reading it.
URL parser FAQ
Why does the same parameter appear twice?
Because a URL can legally carry it twice, usually from two systems appending tags independently. No standard says which value wins — PHP takes the last, some frameworks take the first, others take an array. Never rely on it.
What does double-encoded mean?
The value was percent-encoded, then encoded again, so %2F became %252F. It usually happens when a tracking template wraps a URL that was already encoded. The destination receives literal escape text instead of a URL.
Is the part after the # sent to the server?
No. The fragment is handled entirely by the browser and never leaves it, so it is invisible in server logs and in most analytics unless you explicitly send it.
What are the parts of a URL called?
Scheme, then the authority — which holds any credentials, the host and the port — then the path, the query and the fragment. Knowing the names is most useful when reading an error message, because a complaint about the authority means something quite different from one about the path.
Why does it say my URL is invalid?
Usually a missing scheme. example.com/page is an address people understand and not a URL a parser can accept, because without https:// there is no way to know what protocol to use. Add the scheme and it will parse.
What is the difference between host and hostname?
Host includes the port, hostname does not. For example.com:8443 the host is example.com:8443 and the hostname is example.com. Most code wants the hostname, and the bug where a port sneaks into a domain comparison is a direct result of the confusion.
Can a URL contain a username and password?
The syntax allows it and browsers have been removing support for years, because it was mostly used in phishing. Modern browsers strip or block credentials in a URL, so treat any address carrying them as a red flag rather than a feature.
Why does an accented domain show as xn-- something?
That is punycode, the ASCII encoding of an internationalised domain name. The browser displays the readable form and the DNS system uses the encoded one. Both are the same domain, and comparing one against the other is a common source of false mismatches.
Should I strip tracking parameters before storing a URL?
For anything that identifies a page — a canonical link, a cache key, a database record — yes. Campaign tags, click identifiers and session parameters make the same page look like dozens, and the clean URL is almost always what you meant to store.
Why does the path still show escapes?
Because they may be meaningful. A %2F inside a path segment is a literal slash and not a separator, so decoding it would change what the URL points at. The query parameters are decoded for display because their values are data rather than structure.