Unicode Escape Converter
Represent each character using JavaScript Unicode escapes. UTF-16 mode represents supplementary characters with two surrogate escapes; code point mode uses forms such as \u{1F600}. This tool does not execute JavaScript or parse complete JavaScript or JSON string literals.
Key features
- Choose UTF-16 \uXXXX or code point \u{...} output.
- Decode a mixture of the two escape formats and plain characters.
- Reject unpaired surrogates and out-of-range code points.
How to use
- Choose encoding or decoding.
- For encoding, select the output format and enter text. For decoding, enter Unicode escapes.
- Run the conversion and copy the result. Quotes are not automatically added or removed.
Use cases
- Read escaped Unicode text found in source code.
- Inspect the UTF-16 surrogate representation of emoji.
- Create Unicode escape examples for test data.
Frequently asked questions
What is the difference between the formats?
\uXXXX represents one UTF-16 code unit, so a character above U+FFFF requires two units. JavaScript’s \u{...} form represents a code point directly.
Does decoding handle \n or \t?
No. Only Unicode escapes are decoded. Other backslash escapes produce an error; use a JSON string tool for general JSON escape handling.
Should I surround input with quotes?
No. Quotes are treated as ordinary characters and remain in the result. This is not a parser for complete JavaScript string literals.
Why can an emoji escape be rejected?
A UTF-16 high surrogate must be followed by a low surrogate. Lone surrogates and values above U+10FFFF are rejected.
Privacy
Input and results are processed in browser memory. This tool does not upload or save them; resetting or leaving the page clears them. Shared advertising and visitor analytics may operate separately, but individual input contents are not included in tool-use events.
Comments & questions