URL parser
Split a URL into scheme, login, host, port, path, query parameters and fragment.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/url-parse \
-H 'Content-Type: application/json' \
-d '{"input":{"url":"https://user:[email protected]:8443/a/b%20c?x=1&x=2&y=#top"}}'
import json, urllib.request
body = {'input': {'url': 'https://user:[email protected]:8443/a/b%20c?x=1&x=2&y=#top'}}
request = urllib.request.Request("https://setget.net/v1/tools/url-parse", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/url-parse", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"url":"https://user:[email protected]:8443/a/b%20c?x=1&x=2&y=#top"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "url-parse",
"input": {
"url": "https://user:[email protected]:8443/a/b%20c?x=1&x=2&y=#top"
}
}
{
"input": {
"url": "https://user:[email protected]:8443/a/b%20c?x=1&x=2&y=#top"
}
}
Endpoint: POST /v1/tools/url-parse. Over MCP: run_tool with slug: "url-parse".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
url |
string | yes | The URL to take apart. |
Examples
Input
{
"url": "https://user:[email protected]:8443/a/b%20c?x=1&x=2&y=#top"
}Result
{
"scheme": "https",
"username": "user",
"password": "pw",
"host": "example.com",
"host_type": "domain",
"is_idn": false,
"ascii_host": "example.com",
"unicode_host": "example.com",
"port": 8443,
"default_port": 443,
"path": "/a/b%20c",
"segments": [
"a",
"b c"
],
"query": "x=1&x=2&y=",
"params": {
"x": [
"1",
"2"
],
"y": ""
},
"fragment": "top",
"origin": "https://example.com:8443"
}An internationalised domain name
Input
{
"url": "http://bücher.example/"
}Result
{
"scheme": "http",
"username": null,
"password": null,
"host": "bücher.example",
"host_type": "domain",
"is_idn": true,
"ascii_host": "xn--bcher-kva.example",
"unicode_host": "bücher.example",
"port": null,
"default_port": 80,
"path": "/",
"segments": [],
"query": null,
"params": {},
"fragment": null,
"origin": "http://xn--bcher-kva.example"
}Questions
- Is the URL fetched?
- No. The text is only split into its parts. Nothing is requested or looked up.
- Why is a parameter sometimes a list?
- A name that appears more than once in the query becomes a list of its values, in order.
- What is the origin?
- Scheme, host and port together. Browsers use it to decide which pages may share data.
Related tools
- URL normaliserClean a URL into a standard form: lowercase host, no default port, resolved dots, optional tracking removal.
url-normalize - URL joinerResolve relative links such as ../page or ?q=1 against a base URL, following RFC 3986.
url-join - URL encoder and decoderPercent-encode text for use in a URL, or decode it. Works on one value or a whole URL.
url-encode - .gitignore testerCheck which paths a .gitignore file ignores and which line decided each one, using real Git matching rules.
gitignore-test - Cache-Control explainerExplain a Cache-Control header directive by directive and how browsers and CDNs will treat the response.
cache-control-explain - Card number (Luhn) and IBAN validatorCheck a card number with the Luhn checksum and name its network, or check an IBAN by length and mod-97.
luhn-iban-validate