URL Parser
Parse URLs into components: protocol, domain, path, query parameters, fragment. Decode query strings.
What is a URL parser?
A URL parser splits a web address into its named parts — scheme (protocol), host, port, path, query string and fragment — and decodes each query parameter into a readable key and value. Paste any absolute URL into the box above and MavexTech shows every component instantly, in your browser, without sending the address anywhere. It is handy for checking UTM tags on campaign links, debugging API calls, reading long affiliate or redirect URLs, and confirming that a link points where you think it does.
How to use the URL parser
- Paste a full URL including the scheme, for example
https://shop.example.in/products/shoes?utm_source=newsletter. The result updates as you type. - Read the component cards — Protocol, Hostname, Port (only when it is not the default), Path and Fragment.
- Check the Query Parameters list — every
key=valuepair is shown on its own row, already percent-decoded. - Fix and re-check — if you see “Invalid URL”, the address is missing a scheme or contains a character the parser cannot accept.
The parts of a URL (RFC 3986)
The generic URI syntax is defined in RFC 3986 as scheme ":" hier-part [ "?" query ] [ "#" fragment ], where the hierarchical part of a web address is "//" authority path and the authority is [ userinfo "@" ] host [ ":" port ]. Here is how the tool’s default example breaks down:
| RFC 3986 part | Value in the default example | Shown by the tool as |
|---|---|---|
| scheme | https | Protocol: https |
| host (part of authority) | www.example.com | Hostname: www.example.com |
| port (part of authority) | 8080 | Port: 8080 |
| path | /path/to/page | Path: /path/to/page |
| query | name=John&age=30&tags=js,python | name = John, age = 30, tags = js,python |
| fragment | section | Fragment: section |
A few rules from the standard are worth remembering. The scheme and host are case-insensitive, while the path and query are case-sensitive. Characters outside the allowed set must be percent-encoded as % plus two hex digits (a space becomes %20). The fragment is never sent to the server — the browser keeps it to scroll to an anchor or to drive a single-page app.
How this tool parses URLs
The parser uses the browser’s built-in URL object, which follows the WHATWG URL Standard — the same rules browsers use when you click a link. That standard is compatible with RFC 3986 for normal web addresses but also normalises them the way a browser would. In practice this means:
- The scheme and host are lowercased (
HTTP://Example.COMbecomeshttpandexample.com). - Default ports are dropped:
:80on http and:443on https do not appear in the Port card. - Dot segments are resolved, so
/a/../b/./cis shown as/b/c. - Query values are decoded:
%20and+both become a space. - Internationalised domain names are converted to Punycode (
xn--…), and non-ASCII path characters are shown percent-encoded.
Worked examples (output checked on the live tool)
| Input URL | What the parser shows |
|---|---|
https://user:pass@shop.example.in/products/shoes?utm_source=newsletter&utm_medium=email&utm_campaign=diwali_sale | Protocol https, Hostname shop.example.in, Path /products/shoes, three parameters: utm_source = newsletter, utm_medium = email, utm_campaign = diwali_sale (the user:pass part is not displayed) |
https://example.com/search?q=hello%20world&q=second&city=New+Delhi | Path /search; parameters q = hello world, q = second, city = New Delhi (the repeated key is listed twice) |
HTTP://Example.COM:80/a/../b/./c | Protocol http, Hostname example.com, Path /b/c, no Port card because 80 is the http default |
https://[2001:db8::1]:443/x | Hostname [2001:db8::1] (IPv6 in brackets), Path /x, no Port card |
mailto:support@example.com?subject=Hi | Protocol mailto, empty Hostname, Path support@example.com, parameter subject = Hi |
/relative/path | Invalid URL — a relative reference has no scheme to resolve against |
Common query parameters you will meet
| Parameter | Typical meaning |
|---|---|
| utm_source, utm_medium, utm_campaign | Campaign tracking tags read by analytics tools (where, how and which campaign) |
| utm_term, utm_content | Keyword and ad-variant tags for paid campaigns |
| gclid, fbclid | Click identifiers appended by ad platforms |
| q, s, query | Search terms on search pages |
| page, p, offset, limit | Pagination in websites and APIs |
| ref, aff, tag | Referral or affiliate identifiers |
Tips
- Before sharing a link, parse it and remove tracking parameters you do not need; shorter URLs are easier to read and less likely to break in messages.
- If a parameter value looks wrong, check whether it was double-encoded —
%2520is an encoded%20, which decodes to a literal “%20” instead of a space. - To encode or decode a single value by hand, use the URL Encoder/Decoder.
- When checking where a short or redirecting link finally lands, parse it here first, then follow it with the Redirect Checker.
- Remember that anything after
#stays in the browser, so it cannot be used for server-side tracking.
Limitations & notes
The tool needs an absolute URL. Relative references such as /path or ../img.png are rejected because there is no base URL to resolve them against. Credentials in the authority (user:pass@) are parsed but not displayed — and they should not be put in URLs anyway, since they end up in logs and browser history. Repeated keys are shown as separate rows rather than grouped into an array. The parser does not check that a domain exists or that the page loads; it only checks syntax.
Frequently asked questions
What are the five main parts of a URL?
Following RFC 3986, a URL has a scheme (such as https), an authority (optional user info, the host and an optional port), a path, an optional query after the question mark and an optional fragment after the hash sign.
Can this URL parser handle relative URLs?
No. It requires an absolute URL that starts with a scheme such as https://. For a relative path, add the site address in front, for example https://example.com/relative/path, and parse that.
Why is the port missing from the result?
The browser URL standard drops a port when it equals the scheme default, which is 80 for http and 443 for https. The Port card only appears for a non-default port such as 8080.
Does the tool decode percent-encoded values?
Yes. Query keys and values are decoded, so hello%20world and New+Delhi are displayed as hello world and New Delhi. The path is shown in its encoded form.
What happens with repeated query keys?
Each occurrence is listed as its own row in the order it appears, so q=first&q=second shows two q entries. How a server treats repeats depends on its framework.
Does it work with mailto, tel or ftp links?
Yes, any scheme the browser URL parser accepts works. For mailto: the address appears as the path and parameters such as subject are listed below it.
Is the fragment sent to the server?
No. The part after # is used only by the browser, for example to jump to a heading. Servers and most analytics logs never receive it.
Is my URL uploaded anywhere?
No. Parsing happens entirely in your browser with JavaScript, so private links, tokens or internal addresses never leave your device.
Related tools
URL Encoder/Decoder · Slug Generator · Redirect Checker · htaccess Redirect Generator · Base64 Encoder/Decoder
