How to use it
Paste one URL, or several URLs one per line, into the left pane. Each URL is parsed with the browser’s built-in URL class, which implements the WHATWG URL Standard. You get exactly the parts that fetch(), links and Node.js see, not the result of a hand-written regex.
Output switches between an aligned Report for reading and JSON for copying into code or tests. With several URLs, invalid lines are reported in place and don’t stop the others.
Example
The default sample gives this report:
URL https://shop.example.com:8443/api/v2/orders/?status=paid&tag=new&tag=sale&q=red+shoes#page-2
Protocol https:
Host shop.example.com:8443
Hostname shop.example.com
Port 8443 (default for https: is 443)
Origin https://shop.example.com:8443
Path /api/v2/orders/
1 api
2 v2
3 orders
Query ?status=paid&tag=new&tag=sale&q=red+shoes
status = paid
tag = new
tag = sale
q = red shoes
Fragment #page-2
Note In the query, + is decoded as a space (form encoding), the same as %20. Send a literal plus as %2B.
Note Repeated keys (tag) are kept in order; most servers read them as a list, some keep only the first or last.
Path segments and query values are percent-decoded (stra%C3%9Fe is shown as straße). Repeated keys keep their order. In JSON, params is a list of {key, value} objects for that reason, not a plain object that would lose duplicates.
Warnings it catches
- Credentials in the URL.
ftp://deploy:s3cret@files.example.com/is shown asftp://deploy:****@files.example.com/, and the password is never printed. Credentials in URLs end up in logs, browser history andRefererheaders, so send them in anAuthorizationheader instead. - IDN look-alikes.
https://xn--80ak6aa92e.com/decodes toаррӏе.com, written entirely in Cyrillic letters that look like “apple”. A label that mixes scripts, such aspаypalwith a Cyrillicа, is flagged too. Latin mixed with Japanese, Chinese or Korean is common and not flagged. - Hosts in odd notation.
http://0x7f.1/really means127.0.0.1. This matters for SSRF filters that compare host strings. - Backslashes. Browsers treat
\like/in http(s) URLs, sohttps:\\evil.com\xgoes toevil.com. - Host and port without a scheme.
localhost:3000is a valid URL whose scheme islocalhost:. The tool points this out and suggestshttps://localhost:3000. javascript:anddata:URLs, which can run or embed code.
Common errors
| Input | Message |
|---|---|
example.com/x |
There is no scheme. Add one, e.g. https://example.com/x |
//cdn.example.com/a.js |
This is a protocol-relative URL (it starts with //). Add a scheme: https://cdn.example.com/a.js |
https://a.com:70000/ |
Port 70000 is out of range; ports go from 0 to 65535. |
https://a b.com/ |
The host contains a space, which is not allowed in host names. Percent-encode it in the path instead, or remove it. |
Equivalent code
const url = new URL('https://example.com/search?q=json%20formatter&tag=a&tag=b');
url.hostname; // "example.com"
url.searchParams.get('q'); // "json formatter"
url.searchParams.getAll('tag'); // ["a", "b"]
from urllib.parse import urlsplit, parse_qsl
parts = urlsplit("https://example.com/search?q=json%20formatter&tag=a&tag=b")
parse_qsl(parts.query, keep_blank_values=True) # [('q', 'json formatter'), ('tag', 'a'), ('tag', 'b')]
Python’s urllib does not follow the WHATWG standard. For example, it keeps backslashes and does not normalize 0x7f.1, so the two can disagree on unusual input.
To encode or decode a single value, use URL Encode / Decode. For tokens found in query strings, the JWT Decoder and the Base64 tool show what is inside.
Frequently asked questions
Is + a space or a plus sign?
It depends on where it appears. In the query string, + means a space (the HTML form encoding), exactly like %20, so q=red+shoes decodes to "red shoes". In the path, + is a literal plus sign: /v1.2+build stays as it is. To send a real plus in a query value, write %2B.
Why did the port disappear?
The URL Standard drops a port that equals the scheme's default: 443 for https and wss, 80 for http and ws, 21 for ftp. https://a.com:443/ and https://a.com/ are the same URL. The report notes when this happened.
What is the xn-- in the host name?
It is Punycode, the ASCII form of an internationalized domain name (IDN). Browsers send xn--mnchen-3ya.de to DNS, and may display münchen.de. The report shows both, and warns when a label mixes scripts or uses Cyrillic look-alikes of Latin letters, a common phishing trick.
Why is my URL invalid?
The browser's URL parser only says "Invalid URL". This tool explains the most common reasons: no scheme (example.com/x), a relative or protocol-relative URL, a missing host, a port above 65535 or with letters, a space or other forbidden character in the host, or broken IPv6 brackets.
Is the URL sent anywhere?
No. Parsing happens in your browser with the same WHATWG URL parser that fetch and links use. Passwords in URLs are masked in the report and the JSON output.
Last updated