正在加载,请稍候…

URL Parser & Inspector

Parse a URL into its separate constituent parts (protocol, origin, params, port, username-password, ...)

How to Use

  1. Step 1: Paste a URL into the input field.
  2. Step 2: The URL is parsed into its components: protocol, host, path, query params, hash.
  3. Step 3: Click any field to copy that component.

Frequently Asked Questions

What URL components are shown?

The tool extracts: protocol, username, password, hostname, port, pathname, search query string, individual query parameters, and hash fragment.

What if a URL has no query parameters?

The query parameters section is hidden automatically when no params are present.

What are the components of a URL?

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

Should I use the browser's built-in URL API or a regex to parse URLs?

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.