URL Parser
Break any URL into protocol, host, port, path, query parameters, and fragment. Edit parts and rebuild the full URL instantly. Runs in your browser.
| Field | Value |
|---|
| Key | Value |
|---|
About this tool
Every URL is made up of distinct components, each serving a specific role in locating a resource on the web. The URL Parser breaks any URL down into its individual parts: the protocol (scheme), hostname, port, pathname, query string, and fragment identifier. Understanding these components is essential for debugging API calls, building links programmatically, or analyzing redirect chains.
The parsed fields follow the WHATWG URL Standard, the same specification implemented natively in all modern browsers via the new URL() constructor. Fields like origin combine protocol, hostname, and port into the base address of a resource - useful when setting CORS headers or comparing two URLs to check if they share the same origin. The search field gives you the full raw query string starting with ?, while the Query Parameters table breaks it into individual key-value pairs.
The Edit & Rebuild section lets you modify any individual component and reconstruct a valid URL. This is handy when you need to switch a URL from HTTP to HTTPS, change a hostname between staging and production, strip a query parameter before sharing a link, or add a tracking fragment. Query parameters can be added, removed, or edited individually - the tool uses URLSearchParams to reassemble them correctly with proper encoding.
Tips for using the URL Parser: if a URL has no explicit port, the Port field will show "default", meaning the standard port for the protocol (80 for HTTP, 443 for HTTPS) is implied. Fragment identifiers (the # part) are never sent to the server - they exist only in the browser and are often used for in-page navigation or single-page app routing. If your URL uses percent-encoding (e.g. %20 for a space), the URL API will decode it automatically in the displayed hostname and pathname while preserving encoding in the search string where needed.
Common use cases include: verifying that a UTM-tagged marketing URL is structured correctly before sharing it, comparing canonical URLs across environments, debugging webhook endpoints where the path or query string matters, extracting the domain from a list of URLs, and checking whether two URLs would be treated as same-origin by the browser security model.