How do I encode, decode and parse a URL?
You need to put a search phrase into a link. You copied a URL with percent signs everywhere and you want to read what is actually inside. You are debugging an API and the query string looks like a wall of %20 and &. This tool covers all three.
Three modes in one place: Encode turns plain text into a safe URL fragment, Decode reverses it, Parse splits a full URL into its parts (scheme, host, port, path, query, fragment) and lays the query parameters into a table with proper handling of duplicates, missing values and encoded keys.
Everything runs in your browser. No network calls, no logs, no copies left behind.
How to use it
- Pick a mode at the top: Encode, Decode or Parse. The input box changes its hint to match.
- In Encode mode pick a strategy: encodeURI (encodes only unsafe chars, leaves reserved chars like `?&=` alone), encodeURIComponent (encodes the value of a single query parameter), or strict (the most aggressive, also encodes `! * ' ( )`).
- In Decode mode paste a percent-encoded string. The tool flags malformed sequences like `%E0%A4` with a clear error instead of crashing silently.
- In Parse mode paste a full URL like `https://user:pass@example.com:8443/api/v1/items?a=1&a=2&q=hello%20world&flag#section`. You get a table with scheme, username, password, host, port, path, query, fragment, plus the path split into segments and the query split into key/value rows.
- Click Copy to copy the output. Click Load sample to populate the box with a representative example.
- For query parameters the tool handles duplicates (`?a=1&a=2` shows both values with a "2× duplicate" badge), missing values (`?flag` shows as null), and percent-encoded keys (the original raw key sits next to the decoded one).
When this is useful
The most common situations where one of the three modes saves a few minutes of frustration:
- Pasting a search phrase into a URL. You want a "share this search" link with a query like `?q=hello world & friends`. Spaces, ampersands and quotes break the URL. Encode mode turns it into a safe string you can drop straight into the link.
- Reading a tracking link from an email. You got a marketing email and the link looks like a soup of percent signs. Decode mode shows you the actual destination, including any UTM tags, before you click.
- Debugging an API call. The frontend sends a request and the server logs show `query=hello%20world%26friends`. Decode confirms what the server actually received versus what the frontend thought it sent.
- Understanding a complex URL. A teammate sends a link with basic auth credentials, a non-default port, a long path and 10 query parameters. Parse mode lays it out as a table so you can see what is going where without squinting.
- Validating a URL before storing it. You accept user-submitted URLs (a job board, a portfolio site). Parse mode flags invalid URLs with the native error message, so you can reject them before they hit your database.
- Handling query strings with duplicates. A faceted-search URL has `?tag=react&tag=typescript&tag=nextjs`. The standard `URLSearchParams` gives you a flat list, but seeing all three values grouped under one key in the table makes the structure obvious.
For HTML-context escaping (showing `<` or `&` as literal text on a page) use the HTML entities encoder. For binary payloads, auth headers, or data URLs use the Base64 encoder.