Unicode escape converter
Encode text as Unicode escapes or decode them without executing code.
A clear answer. Here’s how.
Encoding escapes every character as UTF-16 units or braced code points. Decoding accepts \uXXXX and \u{1–6 hex digits}, retains ordinary characters, and rejects other backslash escapes, invalid scalar values and unpaired surrogates. Supplementary characters round-trip through paired UTF-16 escapes. Supports up to 100,000 input characters; this is not a JavaScript string-literal parser.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Text or Unicode escapes
- Café 👋
- Direction
- Text → Unicode escapes
- Encoding spelling
- UTF-16: \uXXXX
Example result
\u0043\u0061\u0066\u00e9\u0020\ud83d\udc4b
Encoding escapes every code point/code unit. Decoding accepts Unicode escapes plus ordinary characters, rejects other backslash escapes and unpaired surrogates. No code is executed.