URL Parser
Break a URL into its components and decode query parameters
About
Break a URL into its components — protocol, host, port, path, query string, and fragment — and decode every query and hash parameter. Protocol-relative (`//host/path`) and path-only URLs are resolved against a placeholder so their structure still shows. Everything runs in your browser; nothing is uploaded.
Examples
Parse a full URL with credentials and port
https://admin:secret123@example.com:8443/api/v1/users?id=42&filter=active#topprotocol: https:
username: admin
password: (hidden — contains sensitive data)
hostname: example.com
port: 8443
pathname: /api/v1/users
search: ?id=42&filter=active
hash: #top
decoded params: id=42, filter=activeAll URL components are separated and shown; query parameters are decoded from percent-encoding so 'active' appears as 'active', not 'active'.
Parse a protocol-relative URL
//cdn.example.com/assets/bundle.jsprotocol: (relative — resolves against page origin)
hostname: cdn.example.com
pathname: /assets/bundle.jsProtocol-relative URLs are resolved against the current page's origin, so the hostname and path are still extracted correctly.
About this tool
A URL is more than just a web address — it has a precise structure defined by RFC 3986: scheme, userinfo (username and password), host, port, path, query string, and fragment. Parsing a URL correctly is essential for routing, authentication, and parameter extraction, and the browser's native URL API handles edge cases that a regex cannot.
This parser breaks any URL into its components using the browser's URL constructor. Query and hash parameters are automatically URL-decoded so you see the actual values, not the percent-encoded forms. Protocol-relative (//example.com) and path-only (/path) URLs resolve against a placeholder base so they still parse correctly.
How to use this tool
Paste a URL
Drop any URL — https://user:pass@host:8080/path?a=1&b=2#section, a short link, a protocol-relative URL, or a path-only string — into the input.
Read the components
The tool shows protocol, username, password, hostname, port, pathname, search (raw query string), and hash, with decoded query and hash parameters listed below.
Copy a component
Click Copy next to any component to grab just that part of the URL.
Use cases
Extracting query parameters from a shared link
Paste a long shared URL and extract the individual query parameters without manual string splitting.
Inspecting a URL with credentials
Check what username and hostname are embedded in a URL without exposing the password in the main display.
Debugging redirect URLs
Paste a redirect target URL and see exactly which path, query, and hash the user will land on after a redirect.
Common mistakes
Mistake:Parsing a URL with a regex instead of the URL API.
Fix:URLs have many edge cases: IPv6 addresses in brackets, colons in the userinfo, port numbers, percent-encoded characters. A regex will break on some of these. The browser's URL constructor handles them all.
Mistake:Forgetting to decode query parameters.
Fix:Query parameters are percent-encoded (space → %20, & → %26). Copying the raw query string may include these codes. The tool decodes them so you see the actual values.
Mistake:Not handling the password field safely.
Fix:URLs with embedded passwords (user:pass@host) expose credentials in the address bar, logs, and referrer headers. Never paste such URLs into shared or logged contexts. The tool warns when a password is detected.
Frequently asked questions
Does it handle IPv6 addresses in URLs?
Yes. IPv6 addresses appear in square brackets in URLs (e.g. https://[::1]:8080/path). The browser's URL API handles them correctly and extracts the hostname including the brackets.
Does it decode URL-encoded characters in the query string?
Yes. Query and hash parameters are automatically URL-decoded, so %20 becomes a space and %3D becomes = in the displayed values.
What about protocol-relative URLs like //cdn.example.com?
Protocol-relative URLs are resolved against a placeholder base URL, so the hostname and path are extracted correctly even without an explicit scheme.
Is my URL uploaded anywhere?
No. Parsing runs entirely in your browser using the native URL API; the input is never transmitted or stored.
Related guides
References & standards
Related tools
API Mock Server
Define mock REST routes and intercept fetch calls client-side
Bandwidth Calculator
Estimate how long a file takes to transfer at a given connection speed — correctly handling bits vs bytes (Mbps vs MB/s) and SI vs binary size units
Broken Link Checker
Extract http(s) links from pasted HTML and check them via proxy
cURL to Code Converter
Convert cURL commands to code snippets in multiple languages. Parse cURL and generate JavaScript, Python, PHP, and more.
DNS Lookup Tool
Query DNS records and resolve domain names to IP addresses
DNS Propagation Checker
Compare DNS answers from global public resolvers and see propagation consensus instantly