Skip to content
Sealpaste

Delete all recent work?

This removes the 0 items saved in this browser. Your settings stay.

Stop saving recent work?

New work won't be saved in this browser. The 0 items already saved can stay or go.

URL Parser

Ready
Runs in your browser. Nothing you paste is uploaded unless you share it.

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

  1. Paste a URL; it is read as you type.
  2. Read the parts and path segments; change, add or remove query parameters in the table and copy the edited URL.
  3. Copy the link sorted, without tracking or without its query from Rebuilt.

Examples

A shop link with tracking

Input
https://shop.example.com/en/products/blue%20mug?id=42&utm_source=newsletter#reviews
Result
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

Input
example.com/search?q=json+to+yaml
Result
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

The URL is read by your browser’s own URL parser (the WHATWG URL Standard every modern browser follows), so the parts are exactly what a browser would request. A link pasted without a scheme, such as example.com/a, is read as https://example.com/a, and the page says so.

PartIn https://ada:pw@shop.example.com:8443/en/mug?id=42#reviewsNotes
SchemehttpsSets the default port: 443 for https, 80 for http
User and passwordada, pwShown masked; anyone who sees the URL can read them
Hostshop.example.comInternational names are shown in punycode (xn--) as browsers send them
Port8443Left out when it is the scheme’s default
Path/en/mugEach segment is listed decoded: %20 becomes a space
Query?id=42Each parameter is listed decoded, + read as a space as forms send it
Fragment#reviewsNot part of the request: browsers keep it and don’t send it to the server

Sources: WHATWG URL Standard

Clean and rebuilt links

Under the parts, the link is written again four ways, each with its own Copy: normalized (as the browser writes it), with the query sorted by name (handy when you compare two links), without tracking parameters such as utm_source, gclid and fbclid, and without the query at all.

A parameter whose name usually carries a credential, such as token, access_token, api_key, signature or X-Amz-Signature, is marked: a signed or token link works for whoever has it, so think before you paste it into a chat or a ticket.

Parsing a URL in code

This page uses the browser’s own URL parser, the one JavaScript’s new URL() runs, so its parts are what fetch and a browser will use. Other languages follow RFC 3986 instead and differ at the edges: Python’s urlsplit and PHP’s parse_url don’t fill in a default port, and parse_url leaves the path percent-encoded.

Read query values with the language’s query parser, not by splitting on & and =: it decodes %20 and + and keeps every copy of a repeated name.

// 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.

Related tools