All Tools

URL Parser: Split a URL and Edit Its Query String

Break any URL into protocol, host, port, path, query and hash with the browser's own parser. Decode path segments, edit query parameters in a table, resolve relative links and see Punycode hostnames. Nothing is uploaded.

Resolves a relative URL such as ../page?x=1 against this address.

Enter a URL to see its parts.


About the URL Parser

The URL Parser splits a web address into its parts and lets you edit its query string as a table. Paste a URL and the tool shows the protocol, username, password, hostname, port, pathname, search, hash and origin, each with its own Copy button, plus the path broken into decoded segments. Below that, every query parameter is listed with its key and decoded value, and you can change, add or remove parameters to rebuild the URL.

The address never leaves your device. It is parsed by the URL parser built into your browser, the same code that runs when you click a link, so nothing is sent, visited or stored. Credentials or tokens in the URL stay on the page.

How to use it

Steps

  1. Paste or type an address into URL, for example https://[email protected]:8080/docs/a%20b?tag=x&tag=y#intro.
  2. Read the parts in the table. Press Copy next to any of them.
  3. Edit a key or value in Query parameters, or press Add parameter or the bin icon. The URL above is rebuilt as you type.
  4. For a relative address such as ../page?x=1, enter the page it belongs to in Base URL to see where it resolves.

What each part means

The protocol is the scheme with its colon, such as https:. The hostname is the server name, and the port is empty when the scheme's default applies; the tool then shows the default, 443 for https and 80 for http, so you know which port a browser will use. The pathname is everything from the first slash up to the query, kept percent-encoded as it travels, and the path segments show each piece decoded, so b%20c reads b c. The search starts with ? and the hash with #. The origin is the scheme, host and port together, which browsers use for security decisions such as CORS.

Query parameters

Parameters are decoded the way a browser form encodes them: + becomes a space and %26 becomes &. A key that appears more than once, such as tag=a&tag=b, keeps every occurrence in order. When you edit the table, each key and value is encoded again, so x y is written as x+y and 1=2 as 1%3D2. To encode or decode a single piece of text by hand, use the URL Encoder and Decoder.

International domain names

Domain names are looked up in ASCII. A name such as bücher.example is shown in its Punycode form xn--bcher-kva.example, exactly as the browser converts it before it contacts the server. This is often the quickest way to spot a look-alike domain in a suspicious link.

Errors

An address without a scheme, such as example.com/page, is not an absolute URL; the tool says so and suggests adding https:// or entering a base URL. A base URL that is itself invalid is reported separately. Data you want to embed in a URL as text can be prepared with the Base64 tool.

Open-source credits

  • Parsing uses the browser's built-in URL and URLSearchParams interfaces, which implement the WHATWG URL Standard. The results therefore match what your browser does with the same address.
  • The tool uses no third-party library.

Frequently asked questions

Why is the port empty for an https address?

The URL Standard leaves the port empty when it is the default for the scheme, which is 443 for https and 80 for http. The tool shows the default in brackets so you can see which port a browser will actually use.

Why does my international domain name look like xn--?

Domain names travel over the network in ASCII. Names with other letters, such as bücher.example, are converted to their Punycode form, xn--bcher-kva.example, exactly as your browser does before it looks the name up. Both forms point to the same site.

Why does a space in a parameter value become a plus sign?

Query strings are encoded as application/x-www-form-urlencoded, where a space is written as + and characters such as & and = are percent-encoded. When the tool rebuilds the URL from the table it uses that encoding, and when it reads a URL it decodes it again, so the table always shows the plain value.

Can a parameter appear more than once?

Yes. A URL such as ?tag=a&tag=b is valid and common for filters and lists. The table keeps every occurrence in its original order instead of keeping only the first or the last one.

Is the URL sent to a server?

No. The address is parsed by the URL parser built into your browser and nothing is sent or visited. That includes any username, password or token in the URL.

Other related tools