A Unicode escape converter turns readable text into escape sequences — JavaScript uXXXX, ES6 u{…}, a U+XXXX code point list, or HTML numeric entities — and turns any of those back into text. The tool above does both directions in your browser: pick Encode or Decode, choose a format, and copy or download the result. Nothing you paste is transmitted anywhere.
What is a Unicode escape?
Every character you type has a Unicode code point — a number that identifies it in the universal character set, written as U+ followed by hexadecimal, like U+0041 for the letter A or U+00E9 for é. When a character cannot be typed directly, or must survive a channel that only tolerates plain ASCII, it is written as an escape sequence instead: a short piece of ASCII that a program expands back into the original character.
Different ecosystems use different escape syntaxes for the same idea:
| Form | Example (é) | Where it appears |
|---|---|---|
uXXXX |
é |
JavaScript, Java, JSON, C# |
u{…} |
u{E9} |
Modern JavaScript, Rust, Swift |
U+XXXX |
U+00E9 |
Documentation, the Unicode standard |
DDDD; |
é |
HTML, XML (decimal) |
XXXX; |
é |
HTML, XML (hexadecimal) |
The astral plane and surrogate pairs
The first 65,536 code points (U+0000 to U+FFFF) make up the Basic Multilingual Plane. Everything above it — most emoji, extended CJK ideographs, musical notation, and ancient scripts — lives in the astral planes. JavaScript stores strings as UTF-16, where a single astral code point is represented by two 16-bit units called a surrogate pair. That is why the rocket 🚀 (U+1F680) becomes 🚀 in classic uXXXX output but a single u{1F680} in ES6 form. This converter uses codePointAt and String.fromCodePoint so it always counts and reconstructs whole characters, never breaking a pair in half.
Common use cases
- Embedding non-ASCII text safely in source code, JSON, or a config file that must stay ASCII-clean.
- Revealing invisible or look-alike characters — a non-breaking space, a zero-width joiner, or a Cyrillic letter posing as Latin — by escaping everything and reading the code points.
- Reading a log line or API payload that arrived full of
uXXXXescapes. - Converting HTML numeric entities back to plain text, or the reverse for markup.
- Looking up the exact
U+code points in a string to check against the Unicode database.
A worked example
Take café 🚀. Encoding with the JavaScript format and “Non-ASCII only” ticked keeps the ASCII letters literal and escapes the rest: café 🚀. Switch to ES6 and the emoji collapses to a single u{1F680}. Switch to the U+ list and you get U+00E9 U+1F680, the bare code points. Paste any of those back with Mode set to Decode and you recover café 🚀 exactly.
Common pitfalls
- Truncated escapes —
uXXXXneeds exactly four hex digits.uE9is invalid; the value isé. - Mixing planes — a lone surrogate (one half of a pair) is not a valid character on its own. Encode from real text rather than editing escapes by hand.
- Decimal vs hex — HTML
éis decimal,éis hex. They describe the same character but thexmatters. - Case — hex digits are case-insensitive on input; this tool emits uppercase for consistency.
Does it run locally?
Yes — everything happens in your browser. The conversion uses native JavaScript string methods on your device, with no server round-trip, no logging, and no third-party analytics on this page. You can load the tool once and finish your work with the network disconnected. Even so, treat any online utility with sensible caution and avoid pasting production secrets into tools you have not verified.