If this tool helped you, you can buy us a coffee ☕
Free online tool for Escape encoding and decoding strings, making URL parameter passing and data processing easier.
When you need to safely pass strings containing non-ASCII characters, spaces, or special symbols in a URL, transmitting them directly can lead to data loss or URL formatting errors. This tool uses Escape encoding to convert each Unicode character in a string into a “%uXXXX” format (e.g., “%u4E2D”), or performs reverse decoding (unescape) on already encoded strings. This ensures data is transmitted completely and correctly in HTTP requests. Escape encoding is a percent-encoding scheme for Unicode characters, primarily used in JavaScript global functions to handle non-ASCII characters in URLs.
Hello 世界!).Hello%20%u4E16%u754C%uFF01).Q: What is the difference between Escape encoding and standard URL encoding (Percent-Encoding)?
A: The main difference lies in the encoding format. Escape encoding converts Unicode characters (like Chinese) into a “%uXXXX” (four-byte hexadecimal) format. For example, “中” is encoded as “%u4E2D”. Standard URL encoding typically converts characters into a “%XX” (two-byte hexadecimal) format and handles ASCII characters (like converting spaces to %20) more universally, which is the recommended practice by RFC standards. In web development, using the standard encodeURIComponent is generally recommended.
Q: Which encoding should I use for browser address bar parameters?
A: It is recommended to use standard URL encoding (such as JavaScript's encodeURIComponent). Because Escape encoding (escape/unescape) is a legacy specification, modern browsers still support it, but not all servers can correctly parse the %uXXXX format, which may result in garbled parameters.
Please note: This tool processes plain text strings and does not support direct file uploads. Entering excessively long text (e.g., tens of thousands of characters) may slow down page responsiveness. The encoded results are primarily intended for URL parameter sections; do not use this to encode an entire URL. When processing user input, be aware that the original data may already contain encoded characters to avoid double encoding. This tool runs locally in your browser, and your data is never uploaded to our servers.
In front-end web development, although the escape/unescape functions exist for historical reasons, they have been deprecated by the W3C. For URL encoding, you should prioritize encodeURIComponent and decodeURIComponent, as they comply with the RFC 3986 standard and offer better compatibility. A typical scenario: when you need to pass a search keyword containing Chinese characters like “北京天气” (Beijing weather) via a GET request, using encodeURIComponent(“北京天气”) yields “%E5%8C%97%E4%BA%AC%E5%A4%A9%E6%B0%94”, whereas escape(“北京天气”) yields “%u5317%u4EAC%u5929%u6C14”. The former is the standard format universally supported by modern Web APIs (like fetch, axios) and server frameworks (like Node.js, PHP).