URL Encode / Decode
Percent-encode or decode a URL or query parameter value.
What is URL Encode / Decode?
URL encoding, also called percent-encoding, is the mechanism defined in RFC 3986 that represents characters unsafe or disallowed in a URL — such as spaces and reserved symbols — as a percent sign followed by two hexadecimal digits (a space becomes %20). It exists because URLs can only safely carry a limited ASCII set, so any character outside it must be escaped for browsers and servers to parse the URL consistently. There are two distinct functions: encodeURIComponent, which escapes everything including structural characters and is meant for a single parameter value, and encodeURI, which preserves the ://, ?, and & that are meaningful in a complete URL. This tool supports both rules for both encode and decode.
How to Use URL Encode / Decode
- Choose "Component" mode to encode/decode a single query parameter value, or "Full URL" mode to encode/decode an entire URL.
- Choose "Encode" or "Decode".
- Type or paste your input — the result updates instantly.
- Click "Copy" to copy the result.
Examples
Encode a value
Input: a b&c=d
Output: a%20b%26c%3Dd
Encode a full URL
Input: https://example.com/search?q=hello world
Output: https://example.com/search?q=hello%20world
Decode
Input: a%20b%26c%3Dd
Output: a b&c=d
Common Mistakes
- Using encodeURIComponent on an entire URL instead of just a parameter value, which mangles the :// and ? that make it a working URL.
- Double-encoding — running encode twice, which turns %20 into %2520 and breaks the intended value.
- Forgetting to encode user input before appending it to a URL, which can break the URL or, in server-side contexts, create an injection risk.
Why Use This Tool
- Covers both the component and full-URL encoding rules, which are genuinely different and easy to mix up.
- Instant feedback with no character limit.
- Runs entirely client-side.
- Clear error messages for malformed percent-encoding, matching what a browser's own parser would reject.