How the parser reads a URL
Paste a link and it is split by your browser's own URL parser, the same code that decides where a click really goes. Nothing is fetched. Each part is shown as the browser stores it, with decoded text alongside where that helps.
- Host: international domain names are shown in Unicode and as the punycode (
xn--) form that DNS uses. IPv4 addresses written in hex or short forms are normalised, and IPv6 addresses are compressed. - Warnings: a user name before the
@, or a domain label mixing Latin with Cyrillic or Greek letters, are classic tricks for making a link look like another site. - Query table: parameters are listed in order, including repeated names. Edit, add or remove rows and the rebuilt URL updates, percent-encoded where needed.
- Encode and decode: component rules for values, whole-URL rules that keep
/and?, or form rules where a space becomes+.
Parser questions
Why does my domain show up as xn--…?
Domain names travel through DNS in ASCII. Names with other characters are converted to punycode, which starts with xn--. Both forms point at the same site.
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves characters that structure a URL, such as / ? & and #, alone, so it suits a whole address. encodeURIComponent encodes them too, which is what you want for a single query value.
Does the parser contact the site?
No. Parsing happens entirely in your browser and no request is made to the address you paste.