Encode or decode URLs and URL parameters. Fast, private, and easy to use.
Query value
red & blueEncoded value
red%20%26%20blueEncode a parameter value with encodeURIComponent. Encoding an entire URL changes its separators.
URL Encoder converts text into a form that is safe to embed in URLs, and decodes percent-encoded strings back into readable text. Paste a query string with Chinese characters, an ampersand, or a stray space, and get a valid, copy-paste-ready result. It is essential for web developers building links, API calls, and tracking URLs.
URLs were originally designed around a limited ASCII character set. Characters outside that set — and reserved characters with special meaning, like ?, &, =, and # — must be encoded as a percent sign followed by the character’s hexadecimal byte value. Non-ASCII text goes through UTF-8 first: the Chinese character 中 becomes %E4%B8%AD, one percent-encoded triplet per UTF-8 byte.
The most common bug in this area is double-encoding, where %20 gets encoded again into %2520. It happens when an already-encoded string passes through an encoder a second time — for example in a redirect chain or a template that encodes automatically. Another frequent confusion is the plus sign: it means a space inside query strings, but is a literal + in path segments. Knowing which part of the URL you are working with tells you which rule applies.
URL encoding replaces unsafe ASCII characters with percent-encoded values.
Spaces are not allowed in URLs, so they're encoded as %20 to make the URL valid.
encodeURI leaves URL structural characters like ? and & intact; encodeURIComponent encodes them too, which is what you want for query parameter values.
In query strings (form-encoded data), + represents a space. In URL path segments it is a literal plus sign.