URL to JSON

Transform URL components into a structured JSON object for saving or sharing.

Understanding URL Components

A URL consists of scheme, user info, host, port, path, query, and fragment. This guide explains each part with examples to improve discoverability.

Scheme (Protocol)
Specifies the protocol, e.g., https, http, ftp.
User Info
Optional username and password before the host, e.g., user:pass@.
Host (Domain)
The domain or IP identifying the server, e.g., example.com.
Port
Optional network port; defaults to 80 (http) or 443 (https).
Path
Hierarchical resource location on the server, e.g., /path/to/page.
Query
Key-value pairs after ?, e.g., ?foo=1&bar=baz.
Fragment (Hash)
Client-side anchor after # pointing to a section, e.g., #section.