Unicode escapes
Six escape syntaxes, one converter. Encode text into JavaScript \uXXXX, ES6 \u{…}, the legacy %uXXXX form that old IIS and ASP query strings still use, HTML numeric references in decimal or hex, or CSS escapes. The decode direction accepts all of them at once, so you can paste a mixed mess and get readable text back.
How to use
- Paste your text or your escaped string into the input.
- Pick a Mode. Decode any escape is the one to use when you do not know which syntax you are looking at — it recognises all six.
- Leave Escape non-ASCII only ticked to keep the readable parts readable; untick it to escape every single character, which is occasionally what a strict parser needs.
- Copy the output. The status line reports how many sequences were converted, so you can tell "nothing matched" from "nothing needed converting".
%uXXXX is not percent-encoding
This one causes real confusion. %u00E9 looks like percent-encoding but is not: it is a Microsoft extension from the JScript escape() function, and it was never part of any URL standard. Modern servers reject it, decodeURIComponent throws on it, and proxies mangle it. If you find it in a live URL, the fix is to decode it here and re-encode the result as UTF-8 percent-encoding — %u00E9 becomes é becomes %C3%A9.
The other trap is astral characters — emoji, rare CJK, historic scripts. They sit above U+FFFF and need two \uXXXX units (a surrogate pair) to express, which is why 😀 encodes as the pair \ud83d\ude00 in \uXXXX mode but as a single \u{1F600} in ES6 mode. Both are correct; the pair form is what older JSON parsers expect.
FAQ
Which escape form should I use in a URL?
None of them — URLs use UTF-8 percent-encoding. These escapes belong in source code, HTML and CSS. Use this tool to move between a code representation and readable text, then encode for the URL with the URL encode / decode tool.
Can it decode a string with several escape styles mixed in?
Yes, that is what decode mode is for. It runs each pattern in turn, so é é %u00E9 all resolve to é in one pass.
Why does an emoji become two escapes?
Because \uXXXX encodes a UTF-16 code unit, not a codepoint, and anything above U+FFFF takes two units. Switch to \u{…} mode for a single escape per character.
Is the CSS form really \0000HH?
CSS accepts one to six hex digits after the backslash, and needs either exactly six digits or a following space to mark where the escape ends. This tool emits the six-digit form because it is unambiguous in every context.