Skip to content

URL Parser

Paste a URL and see it taken apart: scheme, credentials, host, port, path segments, every query parameter decoded into a table, and the fragment. Then change any part and copy the rebuilt address, with names and values encoded correctly. It uses the browser's own URL parser, so the parts are what a browser would see, and it lists what the parser changed. The address is never opened and nothing is sent anywhere. Free, no sign-up.

Parsed in your browser by the browser's own URL parser. Nothing is sent and the address is never opened.

Paste a URL, or load the example, to see its parts.

How to Use the URL Parser

  1. 1. Paste a URL. A full address works, and so does one with no scheme (example.com/page, if the box is ticked), a protocol-relative one (//cdn.example.com/a.js) or a relative reference (/docs?x=1). Load the example fills in a deliberately messy address.
  2. 2. Read the parts. The table lists each part with a note, followed by the path segments, the query parameters and any parameters in the fragment. The notes at the end say what the parser changed or noticed.
  3. 3. Edit and rebuild. The last panel has a field for each part and a row for each parameter. Add, remove, sort or edit them, remove common tracking parameters in one click, and choose how spaces are encoded.
  4. 4. Copy. Copy the normalised URL, the rebuilt one, or the parameters as a JSON object in which repeated names become lists.

The Parts of a URL

PartExampleWhat it is
SchemehttpsHow to fetch the resource. Lower case; the part before :.
Username and passworduser:p%40ssOptional credentials before an @. Browsers discourage them, because they end up in logs and history.
Hostwww.example.comA domain name, an IPv4 address, or an IPv6 address in square brackets. Domain names are case-insensitive, so the parser lower-cases them.
Port8443Optional. When absent, the scheme's default applies: 80 for http, 443 for https, 21 for ftp.
Path/docs/guide%20one/index.htmlSlash-separated segments. Spaces and other unsafe characters are percent-encoded.
Query?q=url+parser&page=2Everything between ? and #: usually name=value pairs joined with &.
Fragment#section=installAfter #. It is never sent to the server; the page's own scripts read it.

How the Query String Is Read

The query is read from the text exactly as written, not through a library that tidies it, so what you see is what is there. Pieces are split at &, and each piece at its first =, so eq=a=b has the value a=b. A plus sign means a space and %XX sequences are decoded as UTF-8, the way form data is decoded. A bare name such as flag has no value and is marked as such. Repeated names are kept in order and marked, because tag=a&tag=b means two values. A percent sequence that is not valid UTF-8, such as %E0%A4, is shown as written and flagged instead of being replaced. A semicolon is not a separator.

A Worked Example

The example address has credentials, an upper-case host, a port, dot segments in the path, seven query parameters and a fragment that is itself a query. The parser reports:

  • Host www.example.com (lower-cased), port 8443, and path /docs/guide%20one/index.html: the ./v2/.. in the middle cancelled out, and the segment guide%20one decodes to guide one.
  • Seven parameters: q (url parser, decoded from the plus), tag twice (flagged as repeating), utm_source (flagged as a tracking parameter), page, empty (present, with an empty value) and flag (no = at all).
  • Two parameters in the fragment, section and mode, shown in a table of their own.
  • Three notes: the address has credentials, the host was normalised, and dot segments were resolved.

Tracking Parameters and Rebuilding

Marketing links often carry extra parameters: the utm_ family, gclid, gclsrc, dclid, fbclid, msclkid, mc_cid, mc_eid, igshid, yclid, _ga, _gl and vero_id. They exist to tell the sender where a click came from, and removing them rarely changes the page, though it is worth checking that the link still works. When you rebuild, names and values are percent-encoded as UTF-8, and you choose whether a space becomes %20 (valid anywhere in a URL) or + (valid only in a query string).

International Host Names

A host name with non-ASCII letters is stored as ASCII in Punycode, with labels that start xn--: münchen.de is xn--mnchen-3ya.de. The tool shows both forms. If a link you did not expect shows an xn-- host, look at the Unicode form: different alphabets can contain letters that look alike, which is how look-alike domains are made.

What It Does Not Do

  • It does not fetch anything. The URL is parsed, never requested, so it does not tell you whether the address exists or where it redirects.
  • It follows the browser's rules. The WHATWG URL standard differs from the older RFC 3986 in details, such as reading backslashes as slashes and removing tabs and line breaks. For web addresses, the browser's behaviour is the one that matters.
  • It has no public suffix list. It shows the host's labels but cannot say which part is the registrable domain, because that depends on a list that changes.
  • It does not interpret parameters. Conventions such as a[]=1 or a.b=2 are shown as plain names.

Frequently Asked Questions

What are the parts of a URL?
A URL is a scheme, optional credentials, a host, an optional port, a path, an optional query and an optional fragment: scheme://user:password@host:port/path?query#fragment. The parser lists each, with the default port for the scheme when none is written, and splits the path into segments and the query into parameters.
How do I decode URL parameters?
Paste the URL and read the parameter table: each name and value is shown decoded, with plus signs turned into spaces and percent sequences read as UTF-8. The Query row of the parts table keeps the raw text, and the parameters can be copied as a JSON object.
What is the difference between %20 and + for a space?
A %20 is a space everywhere in a URL. A + means a space only in a query string written the form-encoding way; in a path, a plus is just a plus. That is why the rebuild option offers both for query values, and why this tool decodes plus as a space in the query but not in the path.
Why did my URL change when I pasted it?
Browsers normalise addresses. The scheme and host become lower case, a default port is dropped, an empty path becomes /, dot segments are resolved, backslashes become slashes and unsafe characters are percent-encoded. The notes under the table list each change that applied to your address.
Are utm parameters safe to remove?
They are analytics tags, so a page almost always works without them, but check the link after removing them. Some sites use a parameter with a similar name for something real, which is why the tool flags known tracking names and lets you remove them in one click rather than guessing.
What does xn-- mean in a URL?
It marks a host name label written in Punycode, the ASCII form of an international name. The tool decodes it to show the Unicode name, so xn--bcher-kva.example reads as bücher.example.
Is the URL sent anywhere or opened?
No. It is parsed in your browser with the built-in URL parser, nothing is sent to CitationEasy or anywhere else, and the address is never requested or opened.

Related Tools

More in Data, Markup & Code

See all Data, Markup & Code