Unicode Escape

Escape characters to \\uXXXX (and \\uXXXX\\uXXXX for surrogates) or unescape back to text.

Unicode escape / unescape

How it works

Escape: we replace each code point with \\uXXXX. Unescape: we parse \\uXXXX and replace.

When to use it

Use when generating code or dealing with Unicode in strings.

Frequently asked questions

Surrogate pairs?

Characters above U+FFFF are escaped as two \\uXXXX (surrogate pair).