URL Encoder & Decoder
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.
FreeNo sign-upPrivate — runs in your browser, nothing is uploaded
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.
Formula & method
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
Example 1: Encode a space
- Input
- hello world
- Result
- hello%20world
- Why
- The space becomes %20.
Example 2: Encode query characters
- Input
- a&b=c
- Result
- a%26b%3Dc
- Why
- & becomes %26 and = becomes %3D so they don't break the query.
Example 3: Decode
- Input
- caf%C3%A9
- Result
- café
- Why
- %C3%A9 is the UTF-8 encoding of “é”.
When to use this tool
- Putting a value with spaces or symbols into a URL query string.
- Decoding a percent-encoded link to read what it contains.
- Building API request URLs safely.
Common mistakes
- Encoding a whole URL with component encoding, which escapes the “://” and slashes. Encode only the parts (like query values).
- Double-encoding — encoding text that's already encoded turns %20 into %2520.
- Forgetting that + is sometimes used for spaces in query strings, while %20 is the strict form.
Frequently asked questions
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.
- Free
- No sign-up
- Runs entirely in your browser — nothing is uploaded.
- Formula and method shown above
Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards below.
Related tools
Related guides
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the tool to appear: