All tools

URL Parser

Break any URL into its protocol, host, path, query params, and hash.

Anatomy of a URL

A URL (Uniform Resource Locator) has several components: the protocol (https:), the hostname (example.com), an optional port (:8080), the path (/page/sub), a query string (?key=value), and an optional hash fragment (#section). This tool uses the browser's built-in URL API to parse all components accurately.

Frequently asked questions

What is the difference between hostname and origin?

The hostname is just the domain (example.com). The origin combines protocol + hostname + port (https://example.com:443). Same-origin policy in browsers uses the full origin, not just the hostname.

Why must I include the protocol?

The browser's URL API requires a protocol to classify the URL correctly. Without https:// or http://, the parser cannot identify the hostname separately from the path.

Page share preview

More free image tools