🔤 Unicode Escape Converter
Turn accented letters, emoji and other non-ASCII characters into \uXXXX escapes — or paste \u escapes to get the readable text back.
4 non-ASCII characters escaped to \uXXXX
How the unicode escape converter works
Encoding replaces every character outside the basic ASCII range (code point above 127) with a \uXXXX escape — the four-hex-digit UTF-16 code unit used by JSON, JavaScript, Java and many config formats. Characters above the Basic Multilingual Plane (like most emoji) become a surrogate pair of two \u escapes. Decoding turns \uXXXX back into its character, and also understands the \u{...} form used in modern JavaScript and Rust.
ASCII characters (plain English letters, digits and common punctuation) are left untouched — only non-ASCII characters are escaped, which is what makes text safe for ASCII-only channels while staying readable. To escape absolutely everything, this isn’t the tool; it targets the common "keep it ASCII-safe" use case.
Frequently asked questions
What is a Unicode escape sequence?
A way of writing a character using its code point in hexadecimal, like \u00e9 for é. It lets you include any character in source code or data files that only safely handle ASCII.
How do I convert text to \u escapes?
Choose Encode and paste your text; every non-ASCII character becomes a \uXXXX sequence. For example café becomes caf\u00e9. Plain ASCII characters are left as-is.
Why does an emoji become two \u escapes?
Characters above U+FFFF (including most emoji) are stored as a UTF-16 surrogate pair, so they encode as two \uXXXX units. Decoding the pair together reproduces the original emoji.
Does it support the \u{...} form?
For decoding, yes — the tool understands both the fixed four-digit \uXXXX form and the braced \u{1F600} form used in modern JavaScript and Rust. Encoding produces the widely compatible \uXXXX form.
Is this the same as URL or HTML encoding?
No. URL encoding uses %XX bytes and HTML uses &#...; entities. \uXXXX is the escape used inside string literals in JSON, JavaScript, Java and similar languages — use the matching tool for each context.