How it works
Characters that have special meaning in URLs, or that are not allowed in them, are replaced with a percent sign and two hexadecimal digits for each UTF-8 byte. A space becomes %20, “é” becomes %C3%A9 and “&” becomes %26.
Choose “a value” to encode a single piece of a URL, such as a search term, where / ? & = # must be encoded. Choose “a full URL” to encode spaces and non-ASCII characters in a complete address while keeping its structure.
Rules this tool follows
- Value mode uses the same rules as JavaScript’s
encodeURIComponent; full-URL mode matchesencodeURI. - Letters, digits and - _ . ! ~ * ' ( ) are never encoded.
- “Encode spaces as +” produces the form-style encoding used in HTML form submissions.
- Text containing a broken emoji half (a lone surrogate) cannot be encoded, and you get a clear error.
Example
Input
café & crème/100%
Output
caf%C3%A9%20%26%20cr%C3%A8me%2F100%25
Common uses
- Building links with search terms or parameters.
- Encoding values for APIs and webhooks.
- Making non-ASCII file names safe in links.
Limitations and notes
- Encoding an already-encoded value encodes the % signs again (%20 becomes %2520). Decode first if you are unsure.
- This is not encryption; anyone can decode it.