Works on this device
URL Parser & Builder
Paste a URL to see each of its parts and its query parameters, or type the parts to build a correctly encoded URL. The work is done on your device. No URL is opened or looked up.
Your URL
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Enter a URL, or choose Try an example.
Result
How it was worked out
How to use this tool
- Choose what you want to do in the menu.
- Take a URL apart and check it: paste one URL. The parts, the query parameters and the path segments are shown at once. If the text is not a valid URL, the first problem is named.
- Build a URL from parts: type the scheme, the host, the path and the query parameters as plain text. The tool percent-encodes each part by its own rule.
- Change, sort or remove query parameters: paste a URL, edit the list of names to remove, and add rows for values you want to set.
- Compare two URLs part by part: paste two URLs to see which parts are the same and which differ.
- Resolve a relative link against a base URL: enter the URL of a page and a link such as
../images/logo.pngto get the full URL. - Choose Copy text or Download file to keep the URL, or Download CSV for the whole result.
The parts of a URL
A URL such as https://user@example.com:8080/docs/page.html?lang=en#top has these parts.
| Part | In the example | What it is |
|---|---|---|
| Scheme | https |
How the address is used. It ends at the first colon. |
| User name and password | user |
Rarely used today. A password in a URL is easy to leak. |
| Host | example.com |
A domain name, an IPv4 address, or an IPv6 address inside [ ]. |
| Port | 8080 |
A whole number from 0 to 65535. The usual port of the scheme is left out. |
| Path | /docs/page.html |
Segments with a slash between them. |
| Query | lang=en |
Pairs of a name and a value after the question mark, with an ampersand between pairs. |
| Fragment | top |
A place inside the page, after the hash sign. It is not sent to the server. |
URLs are read by the rules of the WHATWG URL Standard, which browsers use for links. The usual ports are 80 for http and ws, 443 for https and wss, and 21 for ftp.
The normal form writes the scheme and the host in small letters, leaves out the usual port, resolves . and .. in the path and percent-encodes characters such as spaces.
How the parts are encoded when you build
- Every part is typed as plain text and written as UTF-8. A byte that may not stay as it is becomes a percent sign and two hex digits, such as
%20for a space. - Letters, digits and
-._~are always kept (the unreserved characters of RFC 3986). - In a path segment these are also kept:
!$&'()*+,;=:@. A slash in the path box separates segments. - In a query name or value with the form rule, only letters, digits and
*-._are kept, and a space becomes+. With the%20choice, only the unreserved characters are kept. - In the fragment the path characters and
/and?are kept. In the user name and password only the unreserved characters are kept. - A typed percent sign becomes
%25. Do not enter text that is already encoded. To encode or decode one piece of text, use the URL Encoder & Decoder.
Worked example
The text https://Example.com:443/docs/../Shop/items%20list?size=10&colour=dark+blue&size=12#top is a valid URL. Its normal form is https://example.com/Shop/items%20list?size=10&colour=dark+blue&size=12#top, which is 74 characters long. The host is in small letters, port 443 is left out because it is the usual port of https, and docs/.. is resolved. It has three query parameters: size is 10, colour is dark blue, and size is 12.
To build a URL, enter the host example.com, the path /search/summer shoes and the parameters q with the value red & blue and page with the value 2. The result is https://example.com/search/summer%20shoes?q=red+%26+blue&page=2.
Limits you should know
- The tool reads text only. It does not open a URL, test if a page exists, follow redirects or look up a host name.
- A valid URL can still point to nothing. Valid means only that the text follows the rules for a URL.
- A text such as
localhost:3000orexample.com:8080/pageis a valid URL by the standard, with the first word as the scheme. The tool tells you when this may have happened. - For a scheme that is not
http,https,ws,wss,ftporfile, the host is kept as typed. Some older browsers read such URLs in another way. - The list of names to remove is your own list. The starting list is only an example of common tracking names.
- When two URLs are compared, the query values are compared after decoding. A server may still treat
+and%20, or capital and small letters in a path, in its own way. - One URL can be up to 8,000 characters long.