URL encoder and decoder: percent-encode a link or a value
Turn spaces, accents and symbols into a link that works, or turn a %-encoded mess back into text you can read. Choose whole-URL or single-value mode so you encode exactly what needs encoding.
Updated
How to use it
- Choose encode or decode
Encode to make text safe inside a URL; decode to read an encoded link.
- Pick the mode
Whole URL for a complete address. Single value for one piece you will put after = in a query string, or into a path segment.
- Set the + option when decoding
Tick treat + as space for values that came from an HTML form or a query string, where + often stands for a space.
- Copy the result
If the input has a broken % sequence, such as %G1 or a lone %, the tool shows an error instead of a wrong result.
What is URL encoding?
A URL may only contain a limited set of characters. Letters, digits and - . _ ~ are always safe. Other characters either have a job in the URL's structure (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) or are not allowed at all (spaces, quotes, accented letters, emoji). To carry them as data, they are percent-encoded: each byte of the character's UTF-8 form is written as % followed by two hex digits. A space becomes %20, an ampersand %26 and é becomes %C3%A9.
RFC 3986, the URL standard, recommends uppercase hex digits (%2F rather than %2f) for consistency. Decoders accept both.
encodeURI vs encodeURIComponent: which mode do I need?
The two modes match JavaScript's two built-in functions. The difference is whether the URL's structural characters are encoded.
- The common mistake: using whole-URL mode on a value. A message like "Fish & chips" keeps its &, so everything after it is read as a new parameter and the text is cut off.
- Nesting a URL: a redirect address or a link inside a WhatsApp or email message must be encoded as a single value, or its own ? and & will clash with the outer link.
| Whole URL (encodeURI) | Single value (encodeURIComponent) | |
|---|---|---|
| Leaves alone | Letters, digits, - _ . ! ~ * ' ( ) and ; / ? : @ & = + $ , # | Letters, digits and - _ . ! ~ * ' ( ) |
| Encodes | Spaces, quotes, accents, emoji, % | All of those, plus ; / ? : @ & = + $ , # |
| Use it for | A complete, already well-formed address with spaces or accents in it | One query value, a path segment, or a URL placed inside another URL |
| Example input | https://example.com/café menu?id=7 | Fish & chips? |
| Example output | https://example.com/caf%C3%A9%20menu?id=7 | Fish%20%26%20chips%3F |
Why do some links use + for a space?
HTML forms send data as application/x-www-form-urlencoded, where a space is written as +. Many query strings follow that habit, so q=red+shoes means "red shoes". In a URL path, and in the mailto: standard, + is a literal plus sign and spaces should be %20. Tick treat + as space only when you know the text came from a form or a query string; otherwise you may turn a real plus (as in an email address like jane+news@example.com) into a space.
Building campaign links? The UTM builder encodes each tag value for you. And when an encoded link is too long to share, a BN Shortener short link such as b1.lc/AbC9 (10 characters) can stand in for it.
Sources
- RFC 3986: URI generic syntax, section 2 (characters and percent-encoding), checked 2026-10-23
- encodeURI(), MDN Web Docs, checked 2026-10-23
- encodeURIComponent(), MDN Web Docs, checked 2026-10-23
- RFC 6068: The 'mailto' URI scheme (spaces and + signs), checked 2026-10-23
More free tools
Questions
What does %20 mean in a URL?
It is an encoded space. The % introduces a byte written as two hex digits, and 20 is the code for a space. A + can also mean a space, but only in form data and query strings.
Why does decoding give an error?
The input has a % that is not followed by two hex digits (such as %G1 or a lone % at the end), or the bytes do not form valid UTF-8. The tool flags it rather than guessing, so you can find where the link was damaged.
Should I encode a URL twice?
No. Double encoding turns %20 into %2520, and the server then sees the literal text %20 instead of a space. Encode raw text once; decode first if you are not sure whether something is already encoded.
Do I need to encode accented letters and emoji?
Yes, in the raw URL. Browsers often show them decoded in the address bar for readability, but what is sent is the percent-encoded UTF-8 form.
Is my text sent to a server?
No. Encoding and decoding use your browser's own functions, so tokens, IDs and private links stay on your device.
Which characters never need encoding?
Letters A to Z and a to z, digits 0 to 9, and the four characters - . _ ~. RFC 3986 calls these unreserved.
Try it on your next link
The Free plan includes a custom domain, 5 dynamic QR codes, a bio page and click analytics. No credit card.