URL Encoder / Decoder
Encode text for safe use in URLs, or decode percent-encoded strings back to plain text.
How It Works
URL encoding (percent-encoding) converts characters that are not allowed in URLs into a %XX format, where XX is the hexadecimal value of the character's
UTF-8 byte. For example, a space becomes %20 and = becomes %3D. This tool uses the browser's built-in encodeURIComponent / decodeURIComponent APIs and fully supports
Unicode text.
Frequently Asked Questions
What is URL encoding (percent-encoding)?
URL encoding converts characters that are not allowed in URLs into a %XX hex format. For example, a space becomes %20, & becomes %26, and = becomes %3D. This ensures the URL remains valid and unambiguous when passed to a server.
What characters need to be URL encoded?
Any character outside the unreserved set (A–Z, a–z, 0–9, -, _, ., ~) must be encoded when used as data. Reserved characters like /, ?, &, =, and # have special meaning in URLs and must be encoded if they appear in a value (query parameter, path segment, etc.).
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves characters like /, :, ?, & intact since they are structural. encodeURIComponent encodes a single value (a query parameter or path segment) and encodes those structural characters too. This tool uses encodeURIComponent, which is correct for encoding individual values.
Why does a + in a URL decode to a space?
In the application/x-www-form-urlencoded format (HTML form submissions), + represents a space as a shorthand. In strict URI percent-encoding, + is literal and a space must be %20. When decoding form data, + should be decoded as a space; when decoding a URI component, + is a literal plus sign.