FAQ
What does backslash-u4e2d mean?
It is the Unicode escape for the character at hex code point 4e2d.
Why convert Chinese to Unicode escapes?
To pass Chinese through environments that only accept ASCII, such as legacy systems and code string literals.
Are emoji handled correctly?
Yes. Emoji outside the basic plane become a surrogate pair such as \uD83D\uDE00, which is valid inside JSON and JavaScript strings, and decoding recombines them into the original emoji.
About this tool
Encoding writes each non-ASCII CJK character as \uXXXX, covering CJK punctuation (U+3000–303F), the CJK Unified Ideographs block (U+4E00–9FFF), Extension A (U+3400–4DBF) and fullwidth forms (U+FF00–FFEF). Characters outside the basic plane — emoji, Extension B ideographs — are split into a surrogate pair, so 😀 becomes \uD83D\uDE00, which is exactly how Java and JavaScript represent it internally.
Decoding accepts two forms: the classic four-digit \u4E2D and the ES6 braced form \u{1F600}. Either case works (\u4e2d equals \u4E2D) because hex digits are case-insensitive at the syntax level; output is normalised to uppercase to match Java tooling.
Do not confuse the four notations: for U+4E2D, JavaScript and JSON use \u4E2D, HTML uses 中, CSS uses \4E2D and a URL uses %E4%B8%AD. They are not interchangeable — paste one into the wrong context and it is shown literally. This tool handles the first two only.
The usual reason to convert is an ASCII-only environment: Java .properties files are specified to use escapes, and some legacy systems, SMS gateways and i18n resource files require the same. Escaping only solves transport, not declarations — if the consumer still reads the file as ISO-8859-1, escapes are the right answer; if it reads UTF-8, plain characters are easier to maintain.