URL Parser
Break any URL into scheme, host, path, query parameters, fragment and more
Updated
What is the URL Parser?
Paste an absolute URL to inspect its scheme, hostname, port, path, query parameters, fragment and other parsed components.
The tool uses your browser's URL parser and works locally without sending the URL to a parsing service. URLs can contain credentials or private information, so take care when copying or exporting results.
Use it to inspect query parameters, understand a long address, or build a URL from edited components. Relative paths are supported when you supply a base URL. Percent-encoded components are decoded by default, and you can turn decoding off to view their encoded forms.
How it works
Enter a URL
Type or paste an absolute URL (or a relative path if you also provide a base). Results update live as you type.Optional settings
- Toggle Percent-decode components to turn
%20into spaces and similar sequences into readable text. - Enable Use base URL when the input is relative (for example
/docsor../page.html).
- Explore the four views
- Breakdown – summary stats plus every field (scheme, host, port, path, origin, credentials, etc.) with one-click copy.
- Query params – ordered table of key/value pairs, with their encoded forms from the parsed URL.
- Rebuild – edit any component or add/remove parameters and watch a new URL appear instantly.
- Export – download or copy the full parse result as JSON or plain text.
- Copy or download
Individual values, the rebuilt URL, the query string or the complete JSON report can be copied or saved with a single click.
Parsing uses the browser's native URL constructor, which follows the WHATWG URL parsing rules. The browser may normalize parts of the input when it parses the URL.
Examples
Full URL with auth, port and query
Parse a complex absolute URL containing credentials, a non-default port, path segments and multiple query parameters.
https://user:secret@api.example.com:8443/v2/users?status=active&limit=50#resultsScheme: https
Hostname: api.example.com
Port: 8443
Pathname: /v2/users
Query: status=active, limit=50
Fragment: results
Username: userTracking link with UTM parameters
Inspect marketing and analytics query parameters in a typical campaign URL.
https://shop.example.com/product/42?utm_source=newsletter&utm_medium=email&utm_campaign=summerHostname: shop.example.com
Pathname: /product/42
Query params: utm_source=newsletter, utm_medium=email, utm_campaign=summerRelative path resolved against a base
Resolve a relative URL using an optional base URL to obtain a fully absolute result.
../docs/guide.html?print=1 (base: https://docs.example.com/v1/)Href: https://docs.example.com/docs/guide.html?print=1
Scheme: https
Hostname: docs.example.com
Pathname: /docs/guide.htmlFrequently asked questions
What is a URL parser?
What is a URL parser?
A URL parser takes a Uniform Resource Locator string and splits it into the structured parts defined by the WHATWG URL Standard: scheme, username, password, hostname, port, pathname, search (query string), hash (fragment) and origin. This makes it easy to inspect, debug or rebuild addresses without manual string handling.
Which URL components does this tool extract?
Which URL components does this tool extract?
It extracts scheme (protocol), username, password, hostname, host (hostname + port), port, pathname, search string, query parameters, hash, fragment and origin. Query keys and values are shown decoded by default, alongside their encoded forms from the parsed URL. The URL parser may normalize input before those values are displayed.
Can it parse relative URLs?
Can it parse relative URLs?
Yes. Supply an absolute base URL (for example https://example.com/docs/) and the tool will resolve relative paths such as ../page.html or /api/v1 into a complete absolute URL using the same rules browsers apply.
Does the parser support non-HTTP schemes?
Does the parser support non-HTTP schemes?
Yes. Any scheme accepted by the browser’s URL constructor works—https, http, ftp, file, ws, wss, data, blob and others. The exact components available depend on the scheme (for example a data: URL has no hostname).
How are query parameters handled?
How are query parameters handled?
The query string is split on & while preserving order and empty values. Each parameter is shown with its decoded key/value and the original percent-encoded form. You can also rebuild a clean query string or export the parameters as part of the JSON output.
What happens with invalid or malformed URLs?
What happens with invalid or malformed URLs?
If the browser cannot parse the input—for example, an absolute URL is missing a scheme and no base is supplied, or the host is invalid—the tool displays an error. Some characters are normalized during parsing rather than rejected.
Is percent-decoding always applied?
Is percent-decoding always applied?
By default, percent-encoded path, credentials, fragment and query keys and values are decoded for readability. In query parameters, + is treated as a space; in the path, credentials and fragment, it remains a plus sign. Turning decoding off shows encoded values from the browser-parsed URL, which may differ from the original input if the browser normalized it. Malformed escape sequences are left unchanged.
Is my data sent to a server?
Is my data sent to a server?
The URL parser processes the input locally in your browser and does not send it to a parsing service. Be careful when copying or exporting results that contain sensitive information such as credentials.
Can I rebuild or edit a URL after parsing?
Can I rebuild or edit a URL after parsing?
Yes. The Rebuild view lets you change scheme, host, port, path, credentials, fragment and any number of query parameters. A live preview of the reconstructed URL is shown and can be copied or used further.
What is the difference between host and hostname?
What is the difference between host and hostname?
Hostname is only the domain or IP address (for example example.com). Host includes a non-default port (example.com:8080). For URLs with an origin, the origin combines scheme and host (for example https://example.com:8080); some schemes have no origin.
Related tools
More utilities you might find handy.
Subnet Mask Calculator
Calculate IPv4 subnet details: network, broadcast, host range, CIDR, mask, wildcard, binary mask, and suggest CIDR for desired hosts.
.env File Generator
Generate .env files from key-value pairs with configurable quoting; verify the output with the parser used by your application.
.htaccess Redirect Builder
Generate Apache .htaccess rules for common redirects, HTTPS enforcement, and canonical URL routing; review and test before deployment.