How to use the URL Parser
Parse a URL in two steps:
1
Paste the URL
Paste any full URL into the input field. The URL must include a protocol (e.g. https://). Results appear instantly.
2
Read and copy components
The component table shows all URL parts. Hover over any field to reveal its copy button. The query parameters section lists each key and value separately. Use 'Copy All' to export the full breakdown.
When to use this tool
Use the URL parser to inspect, debug, and understand URL structure:
- →Extracting the hostname, path, and individual query parameters from a complex URL for debugging a web application
- →Inspecting redirect URLs, OAuth callback URIs, or deep link parameters to understand what values are being passed
- →Breaking apart a URL from a log file or analytics report to extract the specific path or parameter of interest
- →Verifying that a programmatically constructed URL has the correct structure before sending an HTTP request
- →Teaching URL structure — seeing all components labelled side by side makes the anatomy of a URL clear
- →Extracting and copying the origin (protocol + hostname + port) from a URL for use in CORS configurations
Frequently asked questions
Q:What URL components does the parser extract?
The parser extracts 10 URL components: Protocol/Scheme (e.g. https), Username (if present in the URL), Password (if present), Hostname (the domain without port), Port (explicit port number if specified), Host (hostname + port combined), Origin (protocol + hostname + port), Path (the /path/to/resource part), Query String (the full ?key=value string), and Fragment/Hash (the #anchor part). Query parameters are additionally split into individual key/value rows.
Q:Why does the URL need to include a protocol?
The parser uses the browser's native URL API (new URL()), which requires a fully qualified URL including the protocol (https://, http://, ftp://, etc.). Without a protocol, the URL is ambiguous — 'example.com' could be interpreted as a path rather than a hostname. If you have a URL without a protocol, prepend https:// before pasting. The parser handles any valid protocol, not just http and https.
Q:What is the difference between hostname, host, and origin?
Hostname is just the domain name without the port: 'example.com'. Host is the hostname plus the port if explicitly specified: 'example.com:8080'. Origin combines the protocol, hostname, and port: 'https://example.com:8080'. Origin is the value used in CORS (Cross-Origin Resource Sharing) headers — two URLs have the same origin if and only if their protocol, hostname, and port all match.
Q:Are query parameters decoded in the output?
Yes — the query parameter values shown in the table are decoded from their percent-encoded form. For example, a parameter value of 'hello%20world' is displayed as 'hello world', and '%C3%A9' is displayed as 'é'. The decoding uses the URLSearchParams API which applies decodeURIComponent internally. The raw encoded query string is also shown in the Query String field if you need the encoded form.
Q:How are duplicate query parameter keys handled?
When the same key appears multiple times in the query string (e.g. ?tag=javascript&tag=react), the parameter table shows each occurrence as a separate row with the same key name. This is the correct representation — URL query strings allow duplicate keys, and the URLSearchParams API's forEach method returns each value separately, which is how the parser enumerates them.
Q:Can I parse URLs with authentication credentials?
Yes — URLs can embed credentials in the format protocol://username:password@hostname/path. The parser extracts the username and password into separate fields. Note that embedding credentials directly in URLs is generally discouraged for security reasons — the credentials appear in browser history, server logs, and referrer headers. The parser handles them correctly for inspection and debugging purposes.