How to use the Unicode escape converter
An escape sequence writes a character using plain ASCII so it can travel safely through source files, config files and APIs. Developers reach for it when a JSON file, a Java properties file or a JavaScript string has to survive a toolchain that mangles non-ASCII bytes. This converter turns pasted text into two different escape notations and turns escaped strings back into readable text.
The first button writes one backslash-u plus four hex digits for every UTF-16 code unit. That is the only form JSON officially accepts, so it is the most portable. The trade-off is that characters outside the Basic Multilingual Plane, including almost every emoji, are stored as a surrogate pair and therefore come out as two sequences. The grinning face emoji becomes \uD83D followed by \uDE00 for exactly this reason.
The second button uses the curly-brace notation, which writes the real code point and keeps an emoji in one piece. Modern JavaScript string literals accept it, but JSON does not. Unescaping understands both notations plus two-digit \x escapes and short escapes such as \n and \t, and shows a message when a sequence is malformed. Ordinary printable ASCII is always left untouched so the output stays readable.
Frequently Asked Questions
Emoji live outside the Basic Multilingual Plane, so UTF-16 stores them as a surrogate pair. The four-digit notation writes each code unit separately. Use the curly-brace button to keep the emoji as a single escape.
No. The JSON specification only allows backslash-u followed by exactly four hex digits. Use the first button when the value is going into JSON.
Printable ASCII is left exactly as it is, so only the characters that actually need escaping are converted. Line breaks and tabs become their short escape forms.