🌐 EN

πŸ”— URL Parser

Paste a URL to instantly decompose it into its components β€” protocol, host, port, path, query string, and hash (fragment) β€” using the browser's built-in URL API. Query parameters are laid out as a key-value table, showing both the raw value and its percent-decoded form.

GUIDE

Learn more

01

1. Anatomy of a URL

A URL follows the pattern scheme://user:pass@host:port/path?query#hash. The scheme (protocol) indicates how the resource should be accessed β€” http, https, ftp, etc. The host is the server's domain or IP, the port is the connection port (omitted when it matches the protocol default: 80 for http, 443 for https), the path locates the resource on the server, the query carries key-value parameters sent to the server, and the hash (fragment) is a client-side-only reference that is never sent to the server. This tool breaks all of these apart precisely using the browser's standard URL API.

02

2. Query parameters and percent-encoding

Query strings use percent-encoding to safely carry spaces, non-ASCII characters, and reserved symbols (a space becomes %20 or +, and non-ASCII characters become UTF-8 bytes written as %XX). The browser's URLSearchParams automatically decodes this into human-readable values. This tool shows the raw value (exactly as written in the URL) side by side with the decoded value, so you can quickly spot double-encoding or unexpected characters.

03

3. Default ports and the origin

When a URL omits the port, the protocol's default port is implicitly used (80 for http, 443 for https, 21 for ftp, and so on). The browser's URL.port property returns an empty string when the port is the default, so this tool explicitly calls that out. The origin β€” protocol + hostname + port (only when non-default) β€” is a foundational concept for browser security policies like CORS, cookies, and localStorage isolation.

Frequently asked questions

Is the URL I paste sent to a server?
No. Parsing happens entirely in your browser using the URL API and is never sent to any server.
Why does it say the URL is invalid?
The browser URL API cannot parse relative paths or malformed strings β€” it requires a scheme (http://, https://, etc.). Make sure you enter an absolute URL, e.g. https://example.com/path.
What happens if the same query key appears more than once?
URLSearchParams allows a key to repeat (e.g. ids=1&ids=2). This tool shows every key-value pair as its own row, in the order it appears.
Is it safe to paste a URL that contains a password?
Processing happens locally in your browser, but embedding credentials in a URL (username:password@host) is itself discouraged for security reasons. This tool shows those components for learning/debugging purposes, but avoid putting plaintext passwords in production URLs.