What Unicode escapes are
Every character has a number, its code point: é is U+00E9, 👋 is U+1F44B. Source code, JSON and logs often write characters as escapes of that number so the file stays ASCII: \u00e9 in JavaScript and JSON, \xe9 or \U0001f44b in Python.
Characters above U+FFFF, like most emoji, need two \u escapes in JavaScript and JSON — a surrogate pair: 👋 is 👋. Newer JavaScript also accepts one escape with braces, \u{1F44B}.
- JavaScript / JSON
\uXXXX; surrogate pairs above U+FFFF. - ES2015+
\u{1F44B}— any code point in one escape. - Python
\xe9,\u00e9,\U0001f44b. - HTML
é— a numeric character reference.
How to use the Unicode escaper
- Pick Decode to read escaped text from a log, an API or source code; every common style is understood at once.
- Pick Encode and a Style to escape text for the language it is going into.
- Tick Escape ASCII Too to escape every character, not only the non-ASCII ones.
- Read the Characters table: each character with its code point and its UTF-8 and UTF-16 form. Invisible characters are named.
- Press Use as Input to run the result back the other way.
Examples
Read escaped JSON from a log
Loggers often escape everything non-ASCII. Decode it back to text.
See why one emoji is two characters
In JavaScript, 👋 has a length of 2: a surrogate pair.
Escape a string for Python
Short \x escapes where they fit, \U for emoji.
Find invisible characters
A zero-width space and a no-break space hide in an email address.
Frequently asked questions
Why does one emoji show as two escapes?
JavaScript and JSON strings are UTF-16. Code points above U+FFFF do not fit in one 16-bit unit, so they are stored as two — a surrogate pair — and each gets its own \u escape.
Why does "é" sometimes have two code points?
It can be one code point (U+00E9) or an e followed by a combining accent (U+0301). They look identical but compare as different strings. Normalise to NFC before comparing — str.normalize("NFC") in JavaScript, unicodedata.normalize in Python.
How do I find invisible characters?
Paste the text and read the Characters table. Zero-width spaces, no-break spaces, byte order marks and control characters are named instead of shown blank.
Does it understand \N{…} names?
No. \N{SNOWMAN} is Python-only and needs Python's Unicode name database; such escapes are left as they are, and the tool says so.
Is my text sent anywhere?
No. Escaping, unescaping and the character table all run in your browser.