HomeWeb ToolsURL Parser & Analyzer

URL Parser & Analyzer

Decompose and validate absolute URLs. Real-time protocol, hostname, port, path, query parameters analysis, dynamic URL reconstruction, and deep diagnostics report.

Decompose and validate absolute URLs. Real-time protocol, hostname, port, path, query parameters analysis, dynamic URL reconstruction, and deep diagnostics report.

This tool is designed to provide a seamless experience for developers by handling complex operations directly in your browser with maximum speed and security.

100% Private
Instant Results
Customizable
Offline Ready
Dev-Friendly
Easy Export

A URL — Uniform Resource Locator — is a string that identifies the location of a resource on the internet and specifies how to retrieve it. Every URL follows the same structure defined by RFC 3986: scheme://authority/path?query#fragment. Each of these components has a specific role. The scheme (also called protocol) tells the browser or client how to communicate — https for secure HTTP, http for plain HTTP, ftp for file transfer, mailto for email links. The authority contains the hostname (domain or IP address) and optionally a port number separated by a colon.

The path identifies the specific resource within the host — in https://api.github.com/users/octocat/repos the path is /users/octocat/repos. The query string starts after the ? and contains key-value pairs separated by ampersands — in ?sort=updated&per_page=10, sort is a key with value updated and per_page is a key with value 10. Query parameters are how web applications pass variable data to servers without changing the path. The fragment starts after the # and identifies a specific section within the resource — it is processed entirely by the browser and is never sent to the server.

URL parsing is the process of splitting a URL string into these individual components so each one can be read, validated, or modified independently. In application code, every major programming language has a built-in URL parsing function: the URL class in JavaScript, urllib.parse.urlparse in Python, URI.parse in Ruby, and java.net.URI in Java. These parsers all produce the same component breakdown that this tool visualizes — protocol, host, hostname, port, pathname, search string, individual query parameters, and hash fragment — making this tool a fast way to verify what a URL parser in your application code will actually see when it processes a given URL.

This tool takes any URL string and breaks it into every component the RFC 3986 standard defines. The result is displayed in two ways: as labeled individual fields showing the protocol, hostname, port, path, and fragment clearly separated, and as a structured JSON object showing the full parse result in the format a URL parser library would return in your application code. Both views update immediately when you click Parse and Analyze URL. The query parameters section is particularly useful — instead of showing the raw query string like ?sort=updated&per_page=10&top, the tool splits it into individual named parameters with their decoded values displayed as key-value pairs. This is how your server-side code and frontend frameworks see the parameters after parsing. URL-encoded values like %20 for space, %2F for slash, and %40 for @ are automatically decoded so you see the actual values rather than the encoded representations. The full structure JSON panel shows every component in the format that JavaScript's built-in URL object returns — protocol, host, hostname, port, pathname, search, hash, origin, and href. This is useful when you are debugging how a specific URL will be interpreted by browser APIs, by fetch() calls in JavaScript, by axios request configuration, or by any other tool that uses the WHATWG URL standard for parsing. If the URL you paste is malformed — missing the scheme, containing invalid characters, or structured incorrectly — the tool reports the specific parse error immediately rather than silently producing incorrect output.

1. Paste any URL into the Target URL field — the URL must be complete including the scheme (https:// or http://). Relative URLs like /users/profile or /api/v1/data are not supported because they have no host component to parse. If you want to try the tool first, click Load Example to populate the field with a sample GitHub API URL that demonstrates all the components including query parameters and a fragment.

2. Click Parse and Analyze URL — the tool uses the browser's native URL parsing API (the same WHATWG URL standard used by JavaScript's new URL() constructor) to break the URL into its components. The parse result appears immediately in the panels below the button.

3. Read the component panels — the Protocol panel shows the scheme (https: or http:), the Hostname panel shows the domain or IP address without the port, the Port panel shows the port number (443 for HTTPS, 80 for HTTP — these are omitted from the URL when they are the default for the scheme), and the Path panel shows the pathname portion after the domain.

4. Check the Parameters panel on the left — each query parameter is shown as its own labeled row with the parameter name and its decoded value. If a parameter value contains URL-encoded characters like %20 or %2F, the decoded value is what appears here. This is the value your server-side code will receive after URL decoding.

5. Inspect the Full Structure JSON panel on the right — this shows the complete parse result as a JSON object with every URL component including the combined host (hostname plus port), the full search string, the hash fragment, the origin, and the complete href. This format matches what JavaScript's URL object returns, making it easy to verify how browser APIs will interpret the URL.

The most common reason I reach for a URL parser during development is debugging a routing issue or an API integration problem where the URL being constructed in code does not match what the server is receiving. Constructing URLs by string concatenation — joining a base URL with a path, adding query parameters one by one with string interpolation — is error-prone. A missing slash between the base and the path, a query parameter value that contains a character that needs encoding, an accidental double question mark — these bugs produce URLs that look almost right when you print them but fail when the server tries to parse them. Pasting the constructed URL into this tool immediately shows you the exact component breakdown and whether the structure is what you intended. The query parameter view is where I find the most bugs. A URL like https://api.example.com/search?query=hello+world&filter=active looks fine as a string, but when you parse it you see that the + in hello+world is decoded as a space by some parsers (application/x-www-form-urlencoded encoding) but left as a literal plus by others (strict percent encoding). Whether your server sees hello world or hello+world as the query value depends on which parsing convention the server uses. Seeing the decoded parameters in the tool immediately shows you what value the server will actually receive. Campaign tracking URLs — the long URLs with utm_source, utm_medium, utm_campaign parameters that marketing teams build — are another use case I see constantly. Marketing teams share these URLs in Slack or documents and they sometimes get corrupted by line wrapping, link shorteners, or copy-paste from rich text editors that encode certain characters. Parsing the URL in this tool shows immediately whether all the expected parameters are present and correctly valued before the campaign goes live.

WHATWG URL standard parsing — uses the same URL parsing implementation as JavaScript's native URL() constructor and all modern browsers so the results match exactly what your frontend and backend code will see

Decoded query parameters — each query parameter is displayed with its URL-decoded value so you see hello world not hello%20world making it immediately clear what value the server actually receives

Full JSON structure output — displays the complete parse result as a JSON object matching the format returned by JavaScript's URL object for easy integration with debugging workflows

Identifies malformed URLs immediately — reports the specific error when a URL is missing its scheme has invalid characters or is structured incorrectly rather than silently producing wrong output

Handles all URL schemes — https http ftp mailto and custom schemes are all parsed correctly with the appropriate component extraction

Fragment component extraction — the hash fragment is clearly identified and separated from the path and query components which browser DevTools sometimes obscures

100% browser-based — your URLs including those containing authentication tokens API keys or internal endpoint paths are never transmitted to any server

Instant parsing — all URL parsing happens locally using native browser APIs with zero latency

Debugging URLs constructed by string concatenation in application code to verify the structure is correct

Inspecting query parameters decoded from API request URLs to see exactly what values the server receives

Verifying campaign tracking URLs (UTM parameters) before a marketing campaign goes live

Debugging OAuth redirect URLs to verify the state

code

and redirect_uri parameters are correctly formed

Inspecting webhook URLs to verify the endpoint path and any token or signature parameters

Checking API endpoint URLs from third-party documentation to understand the expected path and parameter structure

Debugging CORS issues by inspecting the origin component of request URLs

Verifying URL encoding of special characters in query parameter values before sending API requests

Example Input

https://api.github.com/users/octocat/repos?sort=updated&per_page=10#top

Example Output

Protocol:  https:
Hostname:  api.github.com
Port:      443 (default for https, omitted from URL)
Path:      /users/octocat/repos
Fragment:  #top

Query Parameters:
  sort     = updated
  per_page = 10

Full Structure (JSON):
{
  "protocol": "https:",
  "host": "api.github.com",
  "hostname": "api.github.com",
  "port": "",
  "pathname": "/users/octocat/repos",
  "search": "?sort=updated&per_page=10",
  "hash": "#top",
  "origin": "https://api.github.com",
  "href": "https://api.github.com/users/octocat/repos?sort=updated&per_page=10#top",
  "params": {
    "sort": "updated",
    "per_page": "10"
  }
}

Invalid Format — Missing Scheme: The most common parse error is a URL without a scheme. Pasting api.github.com/users or www.example.com/path without the leading https:// causes the parser to fail because without a scheme it cannot determine where the authority ends and the path begins. Always include the full scheme: https://api.github.com/users or http://www.example.com/path.

Malformed URL Structure: URLs that violate the RFC 3986 structure — for example a URL with two consecutive slashes in the path (not as part of the scheme), an invalid character in the hostname like an underscore in certain strict parsers, or a port number that exceeds 65535 — are reported as invalid. The error message identifies which component caused the parse failure.

Empty Input: The tool requires a non-empty URL string. If you click Parse and Analyze URL with an empty input field, the tool will prompt you to enter a URL. Paste a complete URL including the scheme and at least a hostname before parsing.

Relative URLs Not Supported: Relative URLs like /api/v1/users or ../resources/image.png have no host component and cannot be fully parsed without a base URL context. This tool parses absolute URLs only. To parse a relative URL, combine it with its base URL first — for example prepend https://yourapp.com to get https://yourapp.com/api/v1/users and parse the complete URL.

URL-Encoded Characters in the Input Showing Double-Encoded: If you paste a URL that was already URL-encoded once — for example a URL that contains %2520 instead of %20 — the parser decodes it once and the query parameter value shows %20 instead of a space. This means the original URL had been encoded twice. The fix is to decode the URL once before pasting it, or to use the URL Encoder/Decoder tool to strip one layer of encoding before parsing.

Confusing hostname and host in the parsed output

Fix: The parsed output shows both hostname and host as separate fields. They look similar but are different: hostname is just the domain name without the port (api.github.com), while host is the domain plus port if a non-default port is specified (api.example.com:8080). For standard HTTPS on port 443 or HTTP on port 80, host and hostname are identical because the default port is omitted. When constructing URLs in code, use hostname when you need just the domain and host when you need the domain-plus-port combination that appears in HTTP Host headers and CORS origin checks.

Assuming the fragment (#hash) is sent to the server

Fix: The fragment component — everything after the # character in a URL — is processed entirely by the browser and is never included in the HTTP request sent to the server. The server never sees the fragment. This is why anchor links (#section-name) work without any server-side code, and why fragment-based routing in single-page applications works without server configuration. If you are trying to pass data to the server, use query parameters (after the ?) not a fragment. The parsed output in this tool correctly shows the fragment separately to make this distinction clear.

Treating + and %20 as equivalent URL encodings for space in all contexts

Fix: Space can be encoded as either + or %20 in URLs, but they are not universally equivalent. In the query string (application/x-www-form-urlencoded encoding, used by HTML forms), + is decoded as a space by servers. In the path component, + is a literal plus sign — only %20 means a space. Some server frameworks decode + as space everywhere (Flask, Django), others only in form data (Express). If the parsed query parameter value shows + where you expected a space, and your server is not decoding it correctly, use %20 instead of + to encode spaces in URL query parameters constructed in your application code.

Building URLs with string concatenation instead of using a URL builder

Fix: Building a URL by concatenating strings — baseUrl + '/users/' + userId + '?format=' + format — is error-prone because you must manually handle path separators, query string delimiters, and URL encoding of values that contain special characters. Use the platform's URL builder instead: in JavaScript, use new URL('/users/' + userId, baseUrl) then url.searchParams.set('format', format) — the searchParams API handles all encoding automatically. In Python, use urllib.parse.urlencode for query strings and urllib.parse.urljoin for path joining. Paste the result of your URL construction into this tool to verify the components are correct before using the URL in production code.

Not validating OAuth and redirect URLs before using them in authorization flows

Fix: OAuth authorization flows are extremely sensitive to URL accuracy — the redirect_uri parameter must match exactly what is registered with the OAuth provider, the state parameter must be present and correctly formed, and the scope parameter values must be correctly encoded. An OAuth URL that has a missing parameter, an incorrectly encoded scope, or a redirect_uri with an extra slash causes the authorization flow to fail with a cryptic OAuth error that takes time to diagnose. Paste the complete OAuth authorization URL into this tool before redirecting a user to it — the parameter breakdown immediately shows whether all required parameters are present and correctly valued.

Does it support all URL schemes?

Yes. The tool supports all standard URL schemes including https, http, ftp, mailto, file, and custom application schemes like myapp:// or slack://. The scheme is always displayed in the Protocol component of the parsed result. For mailto: URLs, the path component contains the email address and the query string contains optional parameters like subject and body. For file: URLs, the path contains the local file system path.

Can I parse relative URLs?

Relative URLs like /api/v1/users or ../images/photo.jpg cannot be fully parsed on their own because they have no scheme or host component. This tool parses absolute URLs only. To parse a relative URL, combine it with its base URL first to form a complete absolute URL — for example prepend https://yourapp.com to /api/v1/users to get https://yourapp.com/api/v1/users, then paste the complete URL.

Is it safe for sensitive links containing tokens or credentials?

Yes. All URL parsing runs entirely in your browser using the native JavaScript URL API. Your URL — including any authentication tokens, API keys, session IDs, or OAuth codes it contains — is never transmitted to any server, never logged, and never stored. This is important because URLs in authorization flows, webhook signatures, and pre-signed storage URLs often contain sensitive values you would not want processed by a third-party service.

What is the difference between search and query parameters in the output?

The search field in the Full Structure JSON shows the raw query string including the leading ? character — for example ?sort=updated&per_page=10. The params object shows the individual parameters already split and decoded — sort with value updated and per_page with value 10. The search string is the raw value your server receives in the request. The params object is what your server-side framework gives you after parsing that string — for example req.query in Express or request.GET in Django.

Why does the port show as empty even though my URL uses HTTPS?

When a URL uses the default port for its scheme — port 443 for HTTPS or port 80 for HTTP — the port is omitted from the URL and the port field in the parsed output is empty. This is correct behavior per the URL standard. The actual port being used is still 443, but since it is the default it does not appear in the URL string. If your URL uses a non-default port like https://api.example.com:8443/endpoint, the port field will show 8443.

How do I parse URLs in JavaScript, Python, or Go?

In JavaScript (browser and Node.js 10+): const url = new URL('https://example.com/path?key=value') — then access url.hostname, url.pathname, url.searchParams.get('key'), and other properties. This is the same API this tool uses. In Python: from urllib.parse import urlparse, parse_qs then result = urlparse('https://example.com/path?key=value') and params = parse_qs(result.query). In Go: import net/url then u, err := url.Parse('https://example.com/path?key=value') and access u.Host, u.Path, u.Query(). In Ruby: require 'uri' then uri = URI.parse('https://example.com/path?key=value') and URI.decode_www_form(uri.query) for parameters.

What does the origin field mean in the parsed output?

The origin is the combination of scheme, hostname, and port — for example https://api.github.com. It represents the web origin concept used in browser security (the Same-Origin Policy and CORS). Two URLs have the same origin if and only if their scheme, hostname, and port are all identical. https://example.com and http://example.com are different origins (different scheme). https://example.com and https://api.example.com are different origins (different hostname). https://example.com and https://example.com:8443 are different origins (different port). The origin is what browsers compare when deciding whether to block cross-origin requests.

Why does my URL parse differently in the tool than in my application?

This tool uses the WHATWG URL standard (the same standard as JavaScript's URL class and all modern browsers). If your server-side application uses a different URL parsing library — for example Python's urllib which implements RFC 3986 rather than the WHATWG standard — there can be subtle differences in how edge cases are handled, particularly around special characters in hostnames, trailing dots, and certain Unicode characters. For the vast majority of standard URLs, both standards produce identical results. If you see a difference, check whether your server framework's URL parser follows RFC 3986 or WHATWG, and test the specific URL directly in your server code to see what the server actually receives.