URL Encoder / Decoder
Percent-encode query components or whole URLs, decode encoded strings back, and parse any URL into protocol, host, path and query parts.
Reviewed 17 November 2026 · Free · No account needed
How to use
- Choose Encode or Decode.
- Choose the scope: component (safe for query values) or full URL.
- Paste the text and copy the result.
- For encoded URLs, the parsed structure appears underneath.
Example
Input: https://example.com/search?q=café & more
Output: Component: https%3A%2F%2F…q%3Dcaf%C3%A9%20%26%20more
How it works
Encoding percent-encodes characters that are not allowed in a URL (for example a space becomes %20). Decoding reverses percent-encoded sequences back to the original characters.
Encoding uses encodeURIComponent (component mode — every reserved character is escaped) or encodeURI (full-URL mode — ://?& are kept). Decoding replaces + with a space, then resolves percent sequences. When the input parses as an absolute URL, its protocol, host, port, path, query parameters and fragment are listed underneath.
Encoding "café & more" as a component gives caf%C3%A9%20%26%20more; decoding it returns the original text.
Edge cases to know
- Decode treats + as a space, following the query-string convention.
- Malformed percent sequences are rejected with a clear error rather than passed through silently.
- URL parsing requires an absolute URL with a protocol (for example https://).
Limits & compatibility
- Decode treats + as a space (query-string convention).
- Malformed percent sequences are rejected with a clear error.
- Parsing requires an absolute URL with a protocol.
Privacy
All processing runs locally in your browser. URLs — including any tokens in them — are never sent to a server.
Related tools
Questions about URL Encoder / Decoder
What is the difference between component and full-URL encoding?
Component mode encodes every reserved character, so a value is safe to sit inside a query string — a URL pasted as a parameter comes out fully percent-encoded. Full-URL mode uses encodeURI, which preserves the structure characters (/ : ? &) so the result is still a working URL. Pick the scope that matches where the string will end up.
Why does decoding turn + into a space?
Because that is the query-string convention: in form-encoded data a plus sign means a space, so the decoder converts them. Malformed percent sequences — a % not followed by two hex digits — are rejected with a clear error instead of being passed through silently, which is how decoding bugs usually hide.
What does the URL parser break a link into?
Protocol, host, port, path, the fragment, and every query parameter as key/value pairs in order. It requires an absolute URL with a protocol — pasting example.com/path fails with a message saying to include https://. Parsing runs locally, which matters because URLs often carry tokens you would not want sent anywhere.