# URL Parser

> Break a URL into protocol, host, port, path, query parameters and fragment, decode every value, edit the query in a table and rebuild the URL instantly.

- URL: https://www.tooljig.com/url-parser
- Category: [Developer tools](https://www.tooljig.com/category/developer.md)
- Runs: In the browser; nothing uploaded
- Price: free, no account needed

## What it does

Paste a link to see each part on its own line: scheme, username and password, host name, port (including the default when none is written), path segments, every query parameter decoded, and the fragment. Repeated keys such as ?tag=a&tag=b are kept in order. Edit, add or remove query parameters in the table to rebuild the URL, or decode and encode a bare query string. Parsing uses the browser's standard WHATWG URL parser, the same one that loads pages.

## How to use it

1. Paste a URL; a missing https:// is added for you.
2. Read the parts and decoded query parameters.
3. Edit the parameters to rebuild the URL, then copy it.

## Good to know

- Internationalised domain names are shown in both forms: the ASCII “punycode” form browsers send (xn--r8jz45g.jp) and the Unicode form people read (例え.jp).
- The password is hidden until you choose to show it. Rebuilt queries use form encoding, so spaces become + and some characters may be encoded differently from the original while meaning the same thing.

## FAQ

### What is the default port of a URL?

When no port is written, http and ws use 80, https and wss use 443, and ftp uses 21. The parser shows the default it applies.

### What is punycode?

DNS only allows ASCII, so a domain such as bücher.example is sent as xn--bcher-kva.example. Browsers convert between the two forms automatically.

### Is the part after # sent to the server?

No. The fragment stays in the browser and is often used to jump to a section or by single-page apps.

## Related tools

- [URL Encode / Decode](https://www.tooljig.com/url-encode-decode.md): Percent-encode or decode URLs and query strings. Choose between encoding a component or a whole URL.
- [HTML Encode / Decode](https://www.tooljig.com/html-encode-decode.md): Escape text for HTML with entities such as &lt; and &amp;, or decode named, decimal and hex entities back to text. Safe, local and instant.
- [JSON Formatter](https://www.tooljig.com/json-formatter.md): Format, validate and minify JSON with clear error messages that point to the line and column. Runs entirely in your browser.
