URL Parser
// Parse, analyze, and build URLs with component breakdown
| COMPONENT | VALUE |
|---|
| KEY | VALUE |
|---|
// URL BUILDER
Component Breakdown
Instantly parse any URL into its components: protocol, host, port, path, query string, and fragment.
URL Constructor
Build URLs from individual components. Enter each part separately and assemble a complete URL.
Query Parameter Table
View all query parameters as key-value pairs in a clear table. Copy any parameter instantly.
// ABOUT URL STRUCTURE
URL Structure (RFC 3986):
A URL (Uniform Resource Locator) follows the structure defined in RFC 3986. It consists of a scheme (protocol), authority (host and port), path, query, and fragment. Each component serves a specific purpose in locating and accessing web resources.
Example:
https://user:pass@www.example.com:8080/path/page?key=value&foo=bar#section
URL Components:
- >Scheme: protocol used (http, https, ftp, etc.)
- >Authority: host, optional port and credentials
- >Path: hierarchical resource location
- >Query: key-value parameters after ?
- >Fragment: section identifier after #
>> frequently asked questions
Q: What are the parts of a URL?
A: A URL consists of a scheme (protocol like https:), authority (host and optional port), path (resource location), query string (key-value parameters after ?), and fragment (section identifier after #). Together, these components form the complete address of a web resource.
Q: What are query parameters?
A: Query parameters are key-value pairs appended to a URL after the ? character. Multiple parameters are separated by &. For example, in ?name=John&age=30, 'name' and 'age' are keys with values 'John' and '30'. They are commonly used to pass data to web servers.
Q: What is the difference between URL and URI?
A: A URI (Uniform Resource Identifier) is a broader concept that identifies a resource. A URL (Uniform Resource Locator) is a specific type of URI that also provides the means to locate the resource (i.e., it includes the protocol and host). All URLs are URIs, but not all URIs are URLs.
Q: What is percent encoding in URLs?
A: Percent encoding (URL encoding) replaces unsafe characters with a % followed by two hexadecimal digits. For example, spaces become %20, and special characters like & become %26. This ensures URLs are transmitted correctly across the internet.
Q: What is the difference between relative and absolute URLs?
A: An absolute URL contains the complete address including protocol and host (e.g., https://example.com/page). A relative URL specifies only the path relative to the current page (e.g., /page or ../other). Relative URLs are resolved against the base URL of the current document.
// OTHER LANGUAGES
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Check percent encoding, plus signs, Unicode, duplicate query keys and assembled URL components.
- Comparison reference
- Native URL/string encoding interfaces and explicit URL/key-value fixtures.
- Verification scope
- The URL parser’s independent check mainly covers builder components, not every parsing UI output.
Test source and cases (select a file to read it)
-
generator-reliability.test.js
- URL builder: explicit components produce URLs whose components agree with the native URL parser
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.