# URL Encoder & Decoder

URL: https://hifreetools.com/developer/url-encoder

> Encode text for safe use in a URL, or decode a percent-encoded URL back to readable text. Runs in your browser with full Unicode support.

## Quick answer

URL encoding (percent-encoding) replaces characters that aren't allowed in a URL with a “%” followed by their byte value in hexadecimal. For example, a space becomes %20 and an ampersand becomes %26. Decoding reverses it back to the original text.

Encoding uses the browser's encodeURIComponent, which escapes every character that isn't safe in a URL component (spaces, &, =, ?, #, and non-ASCII characters as UTF-8 bytes). Decoding uses decodeURIComponent to restore the original text. Everything runs locally, so the URLs and tokens you enter stay in your browser and are not uploaded.

## Examples

- Encode a space: hello world → hello%20world
- Encode query characters: a&b=c → a%26b%3Dc
- Decode: caf%C3%A9 → café

## FAQ

**What is URL encoding?**
It's a way to represent characters that aren't allowed in a URL by replacing them with a percent sign and their hexadecimal byte value, like %20 for a space.

**When do I need it?**
Whenever a value placed in a URL contains spaces, symbols like & or =, or non-English characters, so the URL stays valid and unambiguous.

**What's the difference between %20 and + for spaces?**
Both can represent a space in a query string. %20 is the strict percent-encoded form; + is an older convention used in form submissions. This tool produces %20.

**Does it handle non-English characters?**
Yes. Characters are encoded as UTF-8 bytes, so accents, emoji, and other scripts encode and decode correctly.

**Is my input uploaded?**
No. Encoding and decoding happen entirely in your browser.

**What's the difference between encodeURIComponent and encodeURI?**
encodeURIComponent encodes more strictly for use in query parameters. encodeURI encodes less (keeps ://?#@) for full URLs. This tool uses encodeURIComponent.

**Which reserved characters like @ and : stay unencoded?**
None of them: this tool encodes @, :, / and the other reserved characters. Only ASCII letters (A–Z, a–z), digits and - _ . ! ~ * ' ( ) stay as-is; accented letters and other scripts are percent-encoded. Encode only parameter values, not the URL structure itself.


Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "URL Encoder & Decoder", https://hifreetools.com/developer/url-encoder
