URL Encoder
Encode special characters in URLs using percent-encoding (encodeURIComponent). Instantly convert spaces, symbols, and Unicode for safe use in query strings.
Tip: Press Ctrl+Enter to encode.
What is URL encoding?
URLs can only contain a limited set of ASCII characters. Percent-encoding (also called URL encoding) converts characters outside that set into a %XX format, where XX is the hexadecimal value of the UTF-8 byte representing the character.
encodeURIComponent vs encodeURI
- encodeURIComponent — encodes everything except letters, digits, and
- _ . ! ~ * ' ( ). Use this for encoding individual query parameter values (what this tool does). - encodeURI — encodes everything except characters that are valid in a complete URI (including
: / ? # @ & = +). Use this only when encoding an entire URL.
Common examples
- Space →
%20 &→%26=→%3D#→%23