URL Parser
Components
Protocolhttps
scheme
Hostexample.com:8443
hostname + port (if any)
Hostnameexample.com
Port8443
default 443
Path/path/to/page
Path segmentspath / to / page
Query?utm_source=news&lang=en&tag=a%20b
Hash#section-2
Originhttps://example.com:8443
Credentialsuser:•••
embedded in URL (avoid in production)
Search params3
distinct key/value pairs
Query parameters (3)
| Key | Raw value | Decoded |
|---|---|---|
| utm_source | news | news |
| lang | en | en |
| tag | a b | a b |