What is Unicode Escape Converter?
Unicode Escape Converter moves between readable text and JavaScript-style \uXXXX notation for debugging, test data, and source inspection. Characters outside the Basic Multilingual Plane use correct UTF-16 surrogate pairs. Decoding strictly checks escape length and pairing without interpreting unrelated backslash sequences. Common workflows include the following. Inspect UTF-16 escapes for Chinese text or emoji. Restore Unicode escapes found in logs or source code. Build non-ASCII compatibility test samples. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Inspect UTF-16 escapes for Chinese text or emoji.
- Restore Unicode escapes found in logs or source code.
- Build non-ASCII compatibility test samples.
How to use it
- Enter plain text or a sequence containing \uXXXX escapes.
- Choose encode or decode.
- Review and copy or swap the output.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
- Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
JSONLane Unicode tools 🚀 support combining text é and emoji 👍🏽.Example 2
\u004A\u0053\u004F\u004E\u004C\u0061\u006E\u0065 \u4E2D\u6587 \uD83D\uDE80Input rules
- Encoding accepts ordinary Unicode text.
- For decoding, every \u must be followed by four hexadecimal digits.
- Isolated or incorrectly paired surrogates are rejected.
- Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- Encoding leaves ASCII characters unchanged and escapes every non-ASCII character.
Output rules
- ASCII remains readable and non-ASCII becomes uppercase hexadecimal escapes.
- Emoji and other supplementary characters become valid surrogate pairs.
- Sequences such as \n and \t are not additionally interpreted.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- Decoding requires exactly four hexadecimal digits after every \u.
Limitations and cautions
- Encoding leaves ASCII characters unchanged and escapes every non-ASCII character.
- Decoding requires exactly four hexadecimal digits after every \u.
- Isolated or incorrectly paired UTF-16 surrogate escapes are rejected.
How your data is handled
Character iteration, surrogate validation, and conversion all happen locally without execution or uploads.