// encode special characters in urls · decode percent-encoded strings · parse url components · nothing leaves your browser
A–Z a–z 0–9 - _ . ! ~ * ' ( ). Use for encoding individual query parameter values.
URL encoding (also called percent-encoding) converts characters that aren't allowed in URLs into a safe format. Each character is replaced with a % followed by its two-digit hexadecimal ASCII code — for example, a space becomes %20.
This is essential when passing special characters like &, =, ?, or non-ASCII text (like Arabic or Chinese characters) in query strings or path segments.
encodeURIComponent for query values, encodeURI for full URLsencodeURI is for encoding a complete URL — it leaves characters like /, ?, #, and & alone because they have structural meaning in a URL. encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — use it for individual query parameter values.%20. In HTML form data (application/x-www-form-urlencoded), spaces are encoded as +. Both are valid in their respective contexts — this tool supports both via the encoding type selector.%XX sequence. For example, é is encoded as %C3%A9 because it's two bytes in UTF-8.A–Z, a–z), digits (0–9), and the symbols - _ . ~. Everything else should be percent-encoded depending on context.encodeURIComponent, then join them with & and append to the base URL. Don't encode the full URL at once — that would encode the ? and = separators, breaking the URL structure.