URL Parser
Paste a URL to see its protocol, host, port, path segments, decoded query parameters and fragment, then edit the parameters and rebuild the URL.
- Protocol
- Hostname
- Port
- Host (with port)
- Origin
- Username
- Password
- Path
- Fragment (#)
Path segments
The path is empty.
Query parameters
| # | Key | Value | Raw |
|---|
This URL has no query string.
Edit and rebuild
Change, add or remove parameters and the fragment: the new URL updates as you type. Parameters are re-encoded as a form would (spaces become +).
How to parse a URL
- Paste a URL in URL to analyze. It is parsed as you type; you can also press Enter or click Parse URL.
- Read the parts: Protocol, Hostname, Port, Host (with port), Origin, Username, Password, Path and Fragment (#).
- Check the Path segments list and the Query parameters table, which shows each key and value decoded, next to the Raw text.
- Under Edit and rebuild, change a key or a value, click Add a parameter or Remove, or edit the fragment. The Rebuilt URL updates as you type.
- Click Copy to copy the new URL.
If you paste an address without a scheme, such as example.com/page, the tool assumes https:// and says so.
The parts of a URL
The tool uses the browser’s built-in URL parser, which follows the WHATWG URL Standard, so it sees the address exactly as a browser does. Take https://ann:secret@shop.example.com:8080/en/products?size=M#reviews:
- Protocol (
https:) is the scheme that tells the browser how to fetch the resource. - Username and Password (
ann,secret) are optional credentials. The password is masked by default; tick Show password to see it. Browsers now strip or refuse such credentials in links, and you should never share a URL that contains one. - Hostname (
shop.example.com) is the server name. Internationalised domain names are shown in their punycode form (xn--…), which is what DNS uses. - Port (
8080) is shown when the URL gives one. Otherwise the tool notes the scheme’s default port: 80 for http and ws, 443 for https and wss, 21 for ftp. A port equal to the default, such as:443on https, is dropped by the parser. - Host (with port) combines both, and Origin is scheme + host + port, the unit browsers use for security rules such as CORS.
- Path (
/en/products) is split into Path segments, each one percent-decoded, socaf%C3%A9readscafé. - Fragment (#) (
reviews) points to a part of the page. It is never sent to the server.
Query parameters
The query string is split on &, and each pair on the first =. Keys and values are decoded the way HTML forms encode them: %XX sequences become characters and + becomes a space. Repeated keys, common for filters and multi-select fields (size=M&size=L), are all kept and labelled “(repeated 1/2)”, “(repeated 2/2)” in order. A key without = is shown with an empty value. When a sequence cannot be decoded, the raw text is shown instead.
Editing and rebuilding
The editor starts with the current parameters. Empty rows are ignored. The new query string is encoded like a form submission, as URLSearchParams does: spaces become + and reserved characters such as &, = or # are percent-encoded, so a value can safely contain them. This is handy to remove tracking parameters, change a page number or build test links. When the password is hidden, it is masked in the Rebuilt URL box too, but Copy copies the real URL.
Frequently asked questions
Why does the tool say my URL is not valid?
The most common causes are spaces in the host, a port above 65535, a missing host after https://, or characters that are not allowed in a host name. Text without a dot, such as a single word, is not treated as a host name either.
Is the URL visited or sent anywhere?
No. The address is only parsed in your browser. No request is made to the site.
Why did %20 become + in the rebuilt URL?
Both mean a space in a query string. The rebuild uses the form encoding produced by browsers and most server frameworks, which writes spaces as +.
Does it handle mailto:, tel: or data: URLs?
Yes. They are parsed too, but they have no host or port: their content appears in the Path.
What is the difference between Host and Hostname?
Hostname is the name only. Host (with port) adds the port when one is given explicitly, as in example.com:8080.
Related tools
- URL Encoder and Decoder Free URL encoder and decoder. Percent-encode query parameters or full URLs, decode %XX sequences and handle + as space. Runs in your browser.
- UTM Link Builder Build campaign URLs with UTM parameters for Google Analytics, one link or hundreds at once, keeping existing query strings, with CSV export.
- HTML Entity Encoder/Decoder Escape special characters as HTML entities (named, decimal or hex) or decode any entity, using the full list of 2,231 HTML5 named references.