Escape non-ASCII characters to \uXXXX, or restore \uXXXX / \xXX
Unicode escape (written as \uXXXX) uses 4 hexadecimal digits to represent a character's code point. It is the standard way to express non-ASCII characters in JavaScript, Java, JSON and similar languages. Escaping Chinese and other characters to \uXXXX makes the text ASCII-only, so it can travel safely through ASCII-only channels and be restored at the destination.
When encoding, this tool keeps printable ASCII intact and escapes only the rest; when decoding, it supports both \uXXXX and \xXX forms while preserving literal text.
Input: Hello, World! → Output: Hello, World!
Reverse — Input: Hello, World! → Output: Hello, World!
\uXXXX is a 4-digit hex code point (covers the whole Basic Multilingual Plane), while \xXX is 2-digit hex (only 0-255). This tool decodes both.\uXXXX.