All tools

Unicode Escape and Unescape

Encoders

Turn \u00e9-style escapes back into readable text, escape text for JavaScript, JSON, Python or HTML, and see every character's code point.

  • Encoder
  • Runs offline
  • Unicode
Decoded
{"city":"Kyiv","greeting":"Étude — 東京 👋"}
Characters (41)
CharCode pointUTF-8UTF-16
{U+007B7B007B
"U+0022220022
cU+0063630063
iU+0069690069
tU+0074740074
yU+0079790079
"U+0022220022
:U+003A3A003A
"U+0022220022
KU+004B4B004B
yU+0079790079
iU+0069690069
vU+0076760076
"U+0022220022
,U+002C2C002C
"U+0022220022
gU+0067670067
rU+0072720072
eU+0065650065
eU+0065650065
tU+0074740074
iU+0069690069
nU+006E6E006E
gU+0067670067
"U+0022220022
:U+003A3A003A
"U+0022220022
ÉU+00C9C3 8900C9
tU+0074740074
uU+0075750075
dU+0064640064
eU+0065650065
SPACEU+0020200020
—U+2014E2 80 942014
SPACEU+0020200020
東U+6771E6 9D B16771
京U+4EACE4 BA AC4EAC
SPACEU+0020200020
👋U+1F44BF0 9F 91 8BD83D DC4B
"U+0022220022
}U+007D7D007D

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

  1. Pick Decode to read escaped text from a log, an API or source code; every common style is understood at once.
  2. Pick Encode and a Style to escape text for the language it is going into.
  3. Tick Escape ASCII Too to escape every character, not only the non-ASCII ones.
  4. Read the Characters table: each character with its code point and its UTF-8 and UTF-16 form. Invisible characters are named.
  5. 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.

Related tools

Learn more