URL Parser
Break any URL into scheme, host, path, query parameters, fragment and more
Updated
What is the URL Parser?
Paste any URL and instantly see every component the browser uses: scheme, username, password, hostname, port, path, query parameters and fragment.
The parser follows the WHATWG URL Standard (the same rules used by modern browsers and Node.js). It works entirely in your browser—no data is sent to a server—so you can safely inspect internal links, API endpoints, tracking URLs and credentials.
Use it to debug redirects, audit UTM parameters, extract path segments, rebuild cleaned URLs or simply understand how a long address is structured. Relative paths are supported when you supply a base URL, and percent-encoded characters can be decoded on demand for readability.
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 every key/value pair together with the original encoded forms.
- 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.
All parsing is performed by the native URL constructor, guaranteeing the same behaviour you see in Chrome, Firefox, Safari and modern server-side runtimes.
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.
Tracking link with UTM parameters
Inspect marketing and analytics query parameters in a typical campaign URL.
Relative path resolved against a base
Resolve a relative URL using an optional base URL to obtain a fully absolute result.
Frequently 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, individual query parameters (key/value pairs), hash, fragment and origin. Both the percent-decoded and original encoded forms of query keys and values are shown.
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 input cannot be parsed (missing scheme when no base is given, illegal characters, etc.) a clear error message is displayed. The tool never silently alters or “fixes” invalid input beyond the normal WHATWG normalization performed by the browser.
Is percent-decoding always applied?
Is percent-decoding always applied?
By default yes—path, credentials, fragment and query values are decoded for readability. You can turn decoding off to inspect the exact percent-encoded bytes that appear in the original string. Malformed escape sequences are left unchanged so the tool never throws on bad encoding.
Is my data sent to a server?
Is my data sent to a server?
No. All parsing, decoding and rebuilding happen locally in your browser using the native URL API. Nothing is uploaded or logged.
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 the port when it is non-default (example.com:8080). Origin combines scheme and host (https://example.com:8080).
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
Quickly generate clean, properly-quoted .env files from key-value pairs — no more quoting errors or broken deployments.
.htaccess Redirect Builder
Generate error-free Apache .htaccess code for 301 redirects, HTTPS enforcement, and canonical URL routing.