URL Parser
Parse a URL into protocol, host, port, path, query table and hash, rebuild it from fields, and encode or decode components. IDN, IPv6 and mailto: supported.
How to use URL Parser
- 1Paste a URL, or choose Build to assemble one from fields, or Encode/Decode to work on a single value.
- 2Read the parts, the decoded query table and any notes about what the parser normalised.
- 3Edit a part in the rebuild form and copy the new URL, or copy each query value from the table.
What makes it better
- Handles https, protocol-relative, mailto:, data:, file: and relative references
- International domains show as both punycode (xn--) and Unicode; IPv6 hosts are kept in brackets
- Query table shows repeated keys, decoded values, and flags broken or double encoding
- Explains encodeURIComponent, encodeURI and form encoding side by side
- Warns when a link carries a username or password
About URL Parser
The URL parser uses the same URL standard your browser follows to split an address into protocol, credentials, host, port, path segments, query parameters and hash. It shows what the parser changed silently, converts international domain names to punycode and back, and lets you edit one part and rebuild the link. Build from fields and Encode/Decode modes are on the same page.
Common uses
- Check which part of a long tracking or redirect URL is the real destination.
- Debug a link that breaks because a value contains &, # or a space that was never encoded.
- Work out whether a look-alike domain is really an international domain in disguise.
- Rebuild a URL with a different host or port while keeping its path and query.
Example
Input
https://user:[email protected]:8443/docs/a%20b/?q=red+shoes&tag=a&tag=b#install
Result
Protocol: https Username: user Password: pass Hostname: www.example.com Port: 8443 Path: /docs/a%20b/ Query: q = red shoes tag = a tag = b Hash: #install
Good to know
- Parsing follows the WHATWG URL standard used by browsers. It deliberately accepts some odd input, such as backslashes or a missing //, and rewrites it; the notes list what changed. Other tools, servers and RFC 3986 parsers may read the same text differently.
- Nothing is fetched. The parser reads the text only, so it cannot tell you whether a page exists, where a redirect goes or whether a domain is safe.
- data: URLs are shown as a truncated preview, and credentials in a URL are displayed in plain text on this page only, never sent anywhere.
URL Parser FAQ
What are the parts of a URL?
A URL is scheme://username:password@host:port/path?query#fragment. Only the scheme and, for web addresses, the host are required; everything else is optional. The parser shows each piece on its own line.
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves the characters that structure a URL (: / ? # & =) alone and is for whole addresses. encodeURIComponent escapes them too and is for one value, such as a search term. Using the first on a value that contains & breaks your query string.
Why did the parser change my URL?
Browsers normalise addresses: they lower-case the scheme and host, drop default ports, convert backslashes, resolve ./ and ../ and encode spaces. A note under the result lists each change so you can see what the real address is.
How are international domain names shown?
DNS only carries ASCII, so a name like münchen.de travels as xn--mnchen-3ya.de, called punycode. The parser shows both forms and warns that look-alike letters from other alphabets are a common phishing trick.
What does a double-encoded value look like?
A space encoded once is %20; encoded twice it is %2520, because the percent sign itself became %25. The query table flags values that contain %25 followed by hex, and the Encode/Decode mode can peel the layers back.