URL Encoder & Decoder
Turn text into a percent-encoded URL fragment or decode an encoded URL back into readable text. Switch between component and full-URI mode depending on what you are escaping.
Output
Enter a value to see the result.
About this tool
Percent encoding replaces characters that have a special meaning in a URL — spaces, `&`, `?`, `#`, `/` and non-ASCII characters — with a `%` followed by their hexadecimal byte value. It is what makes `hello world` become `hello%20world`.
Component mode (`encodeURIComponent`) escapes everything that is not an unreserved character, which is what you want for a single query parameter value. Full-URI mode (`encodeURI`) leaves the structural characters `:/?#[]@` intact so a complete address stays usable.
Frequently asked questions
- When should I use component mode?
- Use component mode when encoding a single value that goes inside a URL, such as a search term or a redirect target. Turn it off when you want to encode a whole address and keep its slashes and colons.
- Why is a space sometimes `%20` and sometimes `+`?
- `%20` is the standard percent encoding. The `+` form comes from the older `application/x-www-form-urlencoded` format used by HTML form submissions.
- How are non-English characters encoded?
- They are converted to UTF-8 bytes first, then each byte becomes a `%XX` sequence. The letter `ş`, for example, becomes `%C5%9F`.
- Why does decoding fail with an error?
- A `%` that is not followed by two valid hexadecimal digits is malformed. Check for truncated input or a literal percent sign that should have been encoded as `%25`.
- Does this tool store my URLs?
- No. Encoding and decoding run in your browser and nothing is sent to a server.