DevKits

Unicode Escape / Unescape — \uXXXX ↔ Text

Escape and unescape Unicode sequences online. Convert any text to \uXXXX / \u{XXXX} form, or reverse escape sequences back to readable text. Handles surrogate pairs and emoji. 100% local.

Last updated:

Comments
12 chars · 1 lines

Frequently Asked Questions

What is a Unicode escape sequence?

A Unicode escape sequence writes a character using its code point in hex. In JavaScript, JSON, and most modern languages that looks like \u00e9 (é) or \u{1F600} (😀). Escaping lets you embed any character in a source-code string literal without depending on the file's encoding.

When does the ES6 \u{XXXX} form matter?

Characters above U+FFFF (like most emoji) don't fit in a single 4-hex-digit \uXXXX. Without the ES6 braces you have to write two UTF-16 surrogate escapes (😀 for 😀). \u{1F600} is one code-point form that many modern parsers accept — but not JSON, which still requires the surrogate pair form.

Does this tool understand \xNN and \n / \t?

Unescape mode does. It handles \uXXXX, \u{XXXX}, \xNN, and the common control escapes (\n, \r, \t, \\, \", \') so pasted string literals from source code just work.

Related Tools