Last reviewed:
What is a URL?
A URL (Uniform Resource Locator) names a resource and says how to reach it. The general shape is scheme://user:password@host:port/path?query#fragment. The scheme (https) selects the protocol. The optional user information holds credentials, which are rarely used today. The host is a domain name or IP address, and the port defaults to 80 for http and 443 for https when omitted. The path identifies the resource on the server. The query carries name=value pairs separated by &. The fragment after # is never sent to the server at all; the browser uses it, for example to scroll to an anchor or for client-side routing.
Only a limited set of characters can appear in a URL directly. Anything else, including spaces, non-ASCII letters and characters that have a structural meaning such as &, =, ? and /, has to be percent-encoded as % followed by the hexadecimal bytes of its UTF-8 encoding. é becomes %C3%A9 and a space becomes %20. In query strings, a space may also be written as +, a convention from HTML form submissions. Encoding is why redirect URLs, search queries and tracking links quickly become unreadable.
Parsing URLs reliably is harder than splitting on / and ?. The WHATWG URL Standard, which all modern browsers and Node.js implement, defines rules for default ports, internationalised domain names, backslashes, .. segments and many edge cases. This tool uses that same parser, so it shows you exactly how a browser interprets the address.
How to use this tool
- Paste or type a URL into the input, or click Paste. Results update as you type. Sample loads a URL that uses every component.
- Check the status line. Valid URL means it parsed as written. If you left out the scheme, as in
example.com/page, the tool assumeshttps://and says so. Invalid URL means even that failed, typically because of a space or a missing host. - Read Components: protocol, username, password, hostname, port (with the default shown when none is given), origin, path, the raw query string and the fragment. Encoded values in the path, credentials and fragment are decoded so you can read them.
- Read Query parameters, where each name and value is decoded, including
+as a space. Repeated names appear once per occurrence. - Read Path segments, numbered from 1, with each segment decoded.
- Click Copy next to any value, or Copy as JSON to copy the query parameters as an object. Repeated names become arrays.
Examples
The sample URL
https://ada:[email protected]:8443/v1/users/42/orders?status=paid&sort=-created_at&tag=new&tag=vip&q=caf%C3%A9%20au%20lait#recent
parses into:
Protocol https:
Username ada
Password s3cret
Hostname api.devtoolworld.com
Port 8443
Origin https://api.devtoolworld.com:8443
Path /v1/users/42/orders
Query ?status=paid&sort=-created_at&tag=new&tag=vip&q=caf%C3%A9%20au%20lait
Fragment #recent
Copy as JSON gives:
{
"status": "paid",
"sort": "-created_at",
"tag": ["new", "vip"],
"q": "café au lait"
}
A nested redirect URL
OAuth and login flows put a whole URL inside a parameter:
https://login.example.com/authorize?client_id=abc&redirect_uri=https%3A%2F%2Fapp.example.com%2Fcallback%3Fnext%3D%2Fdashboard&response_type=code&scope=openid%20email
The parameters decode to client_id = abc, redirect_uri = https://app.example.com/callback?next=/dashboard, response_type = code and scope = openid email. Paste the decoded redirect_uri back into the tool to parse it in turn.
What the parser normalises
Input Result
https://example.com:443/ port is empty: 443 is the default for https
https://example.com/a/b/../c/./d path becomes /a/c/d
https://example.com\admin becomes https://example.com/admin
https://Bücher.example/Straße hostname xn--bcher-kva.example, path /Stra%C3%9Fe
International domain names are converted to their ASCII (Punycode) form, which is what DNS actually looks up.
Common errors and how to fix them
- Invalid URL because of spaces.
http://exa mple.comis rejected. Spaces in a path or query must be encoded as%20(or+in a query); spaces in a host name are never allowed. - Port out of range.
https://example.com:99999is invalid because ports go up to 65535. - Unclosed IPv6 bracket. IPv6 hosts must be written in brackets, as in
http://[::1]:8080/;http://[::1fails. - A
+that should be a plus. In query parameters,+decodes to a space, soq=a+breads asa b. To send a literal plus, encode it as%2B:r=a%2Bbdecodes toa+b. - A value that contains
&or=. Unencoded, it splits into extra parameters. The sender has to encode them as%26and%3D. - Broken percent sequences.
50%on its own is not valid encoding. URLSearchParams leaves it as50%, but strict decoders such as JavaScript'sdecodeURIComponentthrow "URI malformed". Encode a literal percent sign as%25. - Parameters after the
#. Anything after the fragment marker belongs to the fragment, not the query, and is not sent to the server. Move the#…part to the end.
When developers use this
- Reading a long tracking or campaign link to see which UTM parameters it sets.
- Debugging an OAuth or SSO flow by decoding the nested
redirect_uri,stateandscopevalues. - Checking which host and port a misconfigured service URL actually points to, including embedded credentials.
- Extracting IDs from a path, such as a user or order number in a REST URL.
- Comparing how a browser normalises a URL with how your server-side code or router sees it.
- Copying query parameters as JSON to use as test fixtures.
Privacy and how it works
Parsing uses the browser's built-in URL and URLSearchParams objects, and nothing is sent anywhere. The tool does not request or open the URL, so it is safe to paste links containing session IDs, signed-download signatures, OAuth codes or credentials in the user information. If a URL contains a secret, remember that it is also stored in browser history, server logs and proxies wherever it was used.
Limitations
- Results follow the WHATWG URL Standard used by browsers. Older parsers, including some server frameworks and libraries that follow RFC 3986, can treat edge cases such as backslashes or unusual hosts differently.
- Query parameters are decoded with the form-encoding rules (
+means space). APIs that use+literally in queries are rare but exist. - Only the URL itself is analysed. Whether the host exists or the link works is not checked.
FAQ
What is the difference between the path and the query?
The path (/v1/users/42) identifies which resource you want, and the query (?status=paid) passes options or filters for it. Servers can treat both however they like, but by convention REST APIs use the path for identity and the query for optional parameters.
Why is the fragment never sent to the server?
The HTTP specification defines the fragment as a client-side reference within the resource. Browsers strip it before sending the request, which is why single-page apps and OAuth implicit flows use it to keep data away from server logs.
What is the origin?
The origin is the scheme, host and port together, such as https://api.devtoolworld.com:8443. Browsers use it for the same-origin policy, CORS, cookies and storage isolation. Schemes like mailto: have no host, so their origin is null and the tool shows it as empty.
Is %20 or + correct for spaces?
%20 is correct everywhere. + means a space only inside query strings that use form encoding, which is what browsers and most servers expect there. In a path, + is a literal plus sign.
Why does the tool add https:// to my URL?
example.com/page is not an absolute URL, so the parser cannot read it on its own. The tool retries with https:// in front and labels the result so you know the scheme was guessed.
Can a URL have the same parameter twice?
Yes, and many frameworks read repeated names as a list, such as tag=new&tag=vip. Others keep only the first or last value, so check how your server behaves. The tool shows every occurrence and groups them into an array in the JSON copy.
Are usernames and passwords in URLs safe?
No. They are stored in plain text in browser history, shell history, proxies and server logs, and browsers limit their use; Chrome, for example, blocks subresource requests that carry them. Send credentials in an Authorization header instead.