A URL parser breaks a web address into its component parts: protocol, authentication, hostname, port, path, query parameters, and fragment identifier. Understanding URL structure is essential for web development, API debugging, security analysis, and building link-handling logic. Paste any URL to see an instant color-coded breakdown of every component.
URL Input
Invalid URL
Color-Coded URL
Component Breakdown
| Component | Value | Description |
|---|
How to Use the URL Parser
URLs look simple but contain multiple distinct components that serve different purposes. When debugging an API call that returns 401, you need to know if the authentication credentials are in the URL. When a redirect loop occurs, checking the exact path and query string helps find the culprit. Our URL parser breaks down any URL into every component with explanations.
Step 1: Paste Any URL
Copy the URL you want to analyze and paste it into the input field. The parser accepts full URLs including those with authentication credentials, custom ports, complex query strings, and fragments. Click "Load Sample" to see a complete example with all components present.
Step 2: Read the Color-Coded Display
The color-coded URL at the top highlights each component in a distinct color: protocol in purple, authentication in red, hostname in green, port in orange, path in blue, query string in cyan, and fragment in pink. This visual breakdown makes it immediately obvious which part of the URL is which, even in very long URLs.
Step 3: Examine the Component Table
The component breakdown table lists every URL part with its value and a description of what that part does. Each row has a copy button to quickly grab individual components. This is useful when you need to extract just the hostname, just the path, or just the query string from a URL for use in code.
Step 4: Inspect Query Parameters
The query parameters table parses the search string into individual key-value pairs and URL-decodes each value. For example, a query string like ?q=hello+world&lang=en-US expands to show key "q" with decoded value "hello world" and key "lang" with value "en-US". This is invaluable for debugging API calls and understanding tracking parameters.
Understanding URL Structure
Every URL follows the RFC 3986 format: scheme://[userinfo@]host[:port]path[?query][#fragment]. The scheme specifies the protocol. The authority section (host and optional port) tells the browser where to connect. The path specifies the resource. The query provides additional parameters. The fragment is processed entirely by the browser and never sent to the server.
FAQ
Is this URL parser completely free?
Yes, 100% free with no usage limits, no account required, and no premium tiers. Parse as many URLs as you need.
Is my data safe when using this tool?
Absolutely. All parsing happens entirely in your browser using the native browser URL API. Your URLs are never sent to any server, never stored, and never logged.
What URL components does the parser break down?
The parser extracts: protocol/scheme (http, https, ftp, etc.), username and password (auth credentials), hostname, port (explicit or inferred default), pathname, search/query string, individual query parameters (key-value pairs), and fragment/hash identifier.
What does URL percent-encoding mean?
URL percent-encoding (also called URL encoding) replaces characters not allowed in URLs with a '%' followed by two hex digits. For example, space becomes %20, and the plus sign becomes %2B. Query parameter values are often percent-encoded. This tool automatically URL-decodes all query parameter values for readability.
What is the difference between the path and the fragment?
The path (everything between the host and the '?') identifies the resource on the server. The fragment (everything after '#') is a client-side anchor — it's never sent to the server and is handled entirely by the browser to scroll to a specific page section or update UI state in single-page apps.
What is the default port for HTTPS?
HTTPS defaults to port 443. HTTP defaults to port 80. FTP defaults to port 21. When a URL doesn't include an explicit port number, the browser uses the default for the protocol. The parser shows both the explicit port (if present) and the inferred default.
Can I parse relative URLs?
The URL API requires absolute URLs with a protocol. Relative URLs like /path/to/page need to be combined with a base URL. You can manually prepend 'https://example.com' to make a relative URL parseable.