How to break a URL into protocol, host, path and query parameters
Long links with tracking codes are hard to read. URL parser splits one into its parts.
Steps
- Paste a full URL, such as
https://example.com:8080/path/page?id=7&lang=en#top. - Read the parts: protocol, host, port, path, query parameters and fragment.
- Copy what you need.
The parts
- Protocol:
https. - Host:
example.com, the server name. - Port:
8080(normally hidden for 80 and 443). - Path:
/path/page. - Query: after
?, key-value pairs separated by&. - Fragment: after
#, used by the browser only and never sent to the server.
Tips
- Query values are shown decoded, so
%20appears as a space. If you need to build a link safely, use URL encode/decode. - Check redirects and campaign tags (
utm_source) by looking at the parameter list. - Always include the protocol; a bare
example.comis not a full URL.