Features
- Complete URL component extraction
- Query parameter table display
- Port detection with defaults
- Hash fragment parsing
- Invalid URL error handling
- Supports all standard URL schemes
Use Cases
URL Debugging
Inspect URLs to understand their structure and troubleshoot issues
Query Analysis
Extract and review query parameters from API endpoints
Link Validation
Verify URL components are correctly formatted
Route Planning
Analyze URL patterns for routing and navigation logic
URL Structure
A URL consists of several components:Components
| Component | Description | Example |
|---|---|---|
| Protocol | Scheme identifier | https:, http:, ftp: |
| Hostname | Domain or IP address | example.com, 192.168.1.1 |
| Port | Network port | 8080, 443 (default) |
| Pathname | URL path | /api/v1/users |
| Search | Query string | ?id=123&type=admin |
| Hash | Fragment identifier | #section-2 |
Input Format
Enter any valid URL:The URL must include at least a protocol and hostname. Relative URLs (e.g.,
/path/to/page) are not supported.Output Format
The tool provides two outputs:- Text Summary - Component breakdown
- Query Table - Key-value pairs of query parameters
Text Output
Query Parameter Table
| Key | Value |
|---|---|
| key | value |
| foo | bar |
Examples
- Basic URL
- Custom Port
- Hash Fragment
- Complex Query
- IPv4 Address
Parse a standard HTTPS URL.Input:Output:Query Parameters:
| Key | Value |
|---|---|
| category | books |
| sort | price |
Implementation Details
Fromlib/tools/engine.ts:125-144:
URL API
The tool uses the native JavaScriptURL API, which:
- Validates URL syntax
- Handles URL encoding/decoding
- Provides structured access to components
- Supports IPv4, IPv6, and domain names
Default Ports
| Protocol | Default Port | Explicit Port Example |
|---|---|---|
http: | 80 | http://example.com:8080 |
https: | 443 | https://example.com:8443 |
ftp: | 21 | ftp://example.com:2121 |
ws: | 80 | ws://example.com:3000 |
wss: | 443 | wss://example.com:3001 |
When the port matches the protocol’s default, it’s shown as
(default) in the output.Common Patterns
Extract Query Parameters
Build URLs Programmatically
Check Protocol
Get Base URL
Special Cases
Relative URLs
Encoded Characters
Query parameters are automatically decoded:Multiple Values
Query parameters with the same key:| Key | Value |
|---|---|
| tag | beginner |
To access all values, use
url.searchParams.getAll('tag') in JavaScript.URL Validation
The tool validates URLs using the WHATWG URL Standard. Invalid URLs return:- Missing protocol:
example.com/path❌ - Relative path:
/path/to/page❌ - Invalid characters:
https://example .com❌ - Malformed syntax:
https:/example.com❌
Browser Support
TheURL API is supported in all modern browsers:
- ✅ Chrome 32+
- ✅ Firefox 26+
- ✅ Safari 7+
- ✅ Edge (all versions)
Related Tools
- URL Encode/Decode - Encode/decode URL components
- RegExp Tester - Test URL patterns
- JSON Format/Validate - Format query params as JSON