URL encoding (percent-encoding) converts special characters into a safe format for use in URLs. The encoder replaces unsafe characters with a percent sign (%) followed by two hexadecimal digits representing the character's ASCII code. For example, a space becomes %20. The encodeURIComponent() function handles the encoding, while decodeURIComponent() reverses it. This is essential for query parameters, form data, and any user-provided text in URLs.
Special characters like spaces, punctuation, and non-ASCII characters. Safe characters like letters, digits, and a few symbols (- _ . ~) remain unchanged. All others become %XX codes.
encodeURIComponent is stricter and encodes more characters, suitable for query parameters and form data. encodeURI preserves URL structure characters like / and : so it's for full URLs.
When adding user input to URLs, especially in query parameters and form submissions. This prevents special characters from being misinterpreted as URL syntax.
Use this tool for individual components. For full URLs, use decodeURI instead, which preserves URL syntax characters. This tool uses decodeURIComponent for segments.
The technical name for URL encoding. It's a standardized way to represent arbitrary bytes in URLs using only ASCII characters, defined in RFC 3986.
Estimate only. Results reflect your inputs and standard formulas. Double-check important decisions independently.