Split a URL into scheme, host, port, path, query parameters and fragment, all decoded, and copy a cleaned link
Paste a link to see its host, port, path, every query parameter decoded and its fragment, and copy it cleaned of tracking.
How to use it
Paste a URL; it is read as you type. Read the parts and path segments; change, add or remove query parameters in the table and copy the edited URL. Copy the link sorted, without tracking or without its query from Rebuilt.
Examples
A shop link with tracking
https://shop.example.com/en/products/blue%20mug?id=42&utm_source=newsletter#reviews
Host: shop.example.com Port: 443 (the default) Path segments: en, products, blue mug Query: id = 42, utm_source = newsletter (tracking) Fragment: #reviews
No scheme written
example.com/search?q=json+to+yaml
https://example.com/search q = json to yaml
https:// is assumed, and + in a query is read as a space.
The parts of a URL
| Part | In https://ada:pw@shop.example.com:8443/en/mug?id=42#reviews | Notes |
|---|---|---|
Scheme | https | Sets the default port: 443 for https, 80 for http |
User and password | ada, pw | Shown masked; anyone who sees the URL can read them |
Host | shop.example.com | International names are shown in punycode (xn--) as browsers send them |
Port | 8443 | Left out when it is the scheme’s default |
Path | /en/mug | Each segment is listed decoded: %20 becomes a space |
Query | ?id=42 | Each parameter is listed decoded, + read as a space as forms send it |
Fragment | #reviews | Not part of the request: browsers keep it and don’t send it to the server |
Sources: WHATWG URL Standard
Clean and rebuilt links
Parsing a URL in code
// JavaScript
const url = new URL('https://example.com/a?q=1&tag=x&tag=y');
url.hostname; url.searchParams.get('q'); url.searchParams.getAll('tag');
# Python
from urllib.parse import urlsplit, parse_qs
parts = urlsplit('https://example.com/a?q=1&tag=x&tag=y')
parts.hostname; parse_qs(parts.query)['tag'] # ['x', 'y']
// PHP
$parts = parse_url('https://example.com/a?q=1');
parse_str($parts['query'], $query); // $query['q'] === '1'
// Go
u, err := url.Parse("https://example.com/a?q=1&tag=x&tag=y")
u.Hostname(); u.Query().Get("q"); u.Query()["tag"]Questions
- Why is the host shown as xn--…?
That is punycode, the form an international domain name takes on the wire: münchen.de is sent as xn--mnchen-3ya.de. The page shows the name as you typed it next to it. - Is + in a query a plus or a space?
In the query of a URL, as HTML forms write it, + means a space, so q=json+yaml reads as “json yaml”. A real plus sign is written %2B. In the path, + is just a plus. - Can a URL hold the same parameter twice?
Yes, and many servers read that as a list (tag=a&tag=b). Every occurrence is listed here in its order; Query sorted by name keeps repeated ones together and in their order. - Is the URL I paste sent anywhere?
No. Everything runs in your browser, so your text stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first.