URL parser and encoder
A URL parser splits a link into its parts: protocol, domain, path, query parameters and fragment. URL encoding turns characters like spaces and & into safe codes, such as %20 and %26, so they don't break the link.
Last reviewed
Link parts
- Protocol
- https
- Host
- shop.example.com
- Port
- 8080
- Path
- /sale/shoes
- Fragment
- reviews
Query parameters (3)
- color
- red
- size
- 42
- utm_campaign
- summer sale
How the URL parser works
protocol://host:port/path?key=value#fragment
When a tracking link doesn't work, the cause is often hidden in the query string: a parameter spelled wrong, a value that wasn't encoded or a duplicate key. Seeing each parameter on its own line makes these problems obvious.
UTM parameters are highlighted so you can check campaign tags at a glance.
Example
In ?utm_campaign=summer%20sale, the value decodes to 'summer sale'. Encoding 'summer sale & 20% off' gives summer%20sale%20%26%2020%25%20off.
Tips
- Encode any value that contains spaces, &, = or # before adding it to a link.
- Use the URL cleaner afterwards to remove tracking you don't need.
Questions
What is URL encoding?
Replacing characters that have special meaning in links with % codes, so they are read as plain text. A space becomes %20.
What is a query parameter?
A key=value pair after the ? in a link, such as utm_source=google. Several are joined with &.
Embed the URL parser and encoder on your site
Free for blogs, newsletters and client reports. Paste this code where you want the tool to appear. It stays up to date automatically.