Parse a URL into its separate constituent parts (protocol, origin, params, port, username-password, ...)
The tool extracts: protocol, username, password, hostname, port, pathname, search query string, individual query parameters, and hash fragment.
The query parameters section is hidden automatically when no params are present.
A URL consists of: scheme (https), optional userinfo (user:pass), host (domain/IP), optional port, path, query string (?key=value), and fragment (#anchor). Example: https://user:pass{'@'}example.com:8080/path?q=1#top
Strongly prefer the built-in API: the browser's new URL(urlString) and Node.js's new URL(urlString) correctly handle all edge cases (IPv6 addresses, Unicode domain names, relative paths). A hand-written regex is unlikely to cover all valid URL formats defined in RFC 3986. URL parsing looks simple but has many edge cases — using the standard library is the most reliable approach.