DevTools Hub

Unicode Converter

Convert text to and from Unicode escape sequences.

Runs locally
InputText
8 chars
OutputUnicode escapes
Ready
The output will appear here.
Status
Unicode escapes processed locally.

How it works

Escaping rewrites every character as a code-point escape in the \u{...} form: A becomes \u{0041} and the euro sign becomes \u{20ac}. Every character is escaped, not just the unusual ones, which makes the output safe to paste into source that must stay pure ASCII.

Because escaping walks the string by code point rather than by UTF-16 unit, characters outside the Basic Multilingual Plane stay whole. A grinning face becomes the single escape \u{1f600} instead of a surrogate pair.

Unescaping accepts both forms: the modern \u{1f600} with braces and the classic four-digit \u00e9. Surrogate pairs written as two four-digit escapes recombine into the original character, and text that contains no escapes passes through unchanged.

Frequently asked questions

What is the difference between \u00e9 and \u{1f600}?
The four-digit form encodes one UTF-16 code unit and so reaches only U+FFFF. The braced form takes any number of hex digits and can express every code point, which is what emoji above U+FFFF need.
How are emoji represented in JavaScript strings?
As a surrogate pair of two UTF-16 code units. A grinning face is 😀 in the old form, or \u{1F600} as a single code point. This converter reads both and always writes the code-point form.
Why is every character escaped instead of only the special ones?
So the output is unambiguous and pure ASCII, which is what you want when pasting into a file or protocol that cannot be trusted with non-ASCII bytes. Unescaping restores the original text exactly.
Is a code point the same as a character?
Nearly, but not always. Some visible characters are made of several code points, such as a flag or an emoji with a skin-tone modifier. Those are escaped as several sequences and rebuilt correctly on the way back.