Unicode Escape Converter

Convert text to UTF-16 Unicode escapes and decode four-digit escapes, braced code points and surrogate pairs. Encoding normally escapes non-ASCII and backslashes; an option escapes every UTF-16 unit.

Encoding accepts 100,000 UTF-16 units; decoding accepts 600,000, with output at most 600,000. Points above U+10FFFF fail. Doubled backslashes are supported; other ordinary escapes are unchanged. This does not execute code or parse complete JSON strings. ASCII quotes and newlines remain unchanged unless all-unit encoding is selected.

Input

Output

Unicode Escape Converter

Convert text to UTF-16 Unicode escapes and decode four-digit escapes, braced code points and surrogate pairs.

Usage guide