URL Parser & Component Extractor

Formula: new URL(string) - WHATWG URL Standard

URL Parser

URLs (Uniform Resource Locators) have a defined structure standardized by RFC 3986 and the WHATWG URL spec. Parsing a URL correctly is essential for web development, API work, and debugging.

Conversion Formula

new URL(string) - WHATWG URL Standard

The WHATWG URL API (used by all modern browsers and Node.js) parses URLs according to the living standard, handling edge cases like Unicode domains (IDN), IPv6 hosts, and non-standard ports.

Step-by-Step Examples

https://example.com/search?q=hello+world&page=2#results = Protocol: https: | Host: example.com | Path: /search | Params: q=hello world, page=2

Typical search URL with two query params and a fragment

History

URLs were defined by Tim Berners-Lee in 1994 (RFC 1738). The WHATWG URL Living Standard (2012+) unified parsing behavior across browsers, replacing the older RFC 3986.

Common Use Cases

  • API endpoint debugging
  • UTM parameter inspection
  • Redirect chain analysis
  • Link building
  • Web scraping

Frequently Asked Questions

What are the components of a URL?

Protocol (https:), host (domain + port), pathname (/path/to/page), search (?key=value query string), and fragment (#section). Together they form the Uniform Resource Locator.

What is URL encoding in query parameters?

Special characters in query values are percent-encoded (%20 for space, %26 for &). This tool decodes them for readability. The raw query string shows the encoded form.

What is the difference between relative and absolute URLs?

Absolute URLs include the protocol and host (https://example.com/page). Relative URLs omit them (/page or ../other). This parser requires absolute URLs.