Turn characters into escape sequences for JavaScript, ES6, CSS, Python, Java or C, which is useful when source files or config formats must stay pure ASCII.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
How to use the Unicode Escape
- Paste text containing accented letters, non-Latin scripts or emoji.
- Choose the escape style for your target language – JavaScript, ES6, CSS, Python, Java or C.
- Choose whether to escape only non-ASCII characters or every character.
- Click "Escape Unicode".
Frequently asked questions
Why does an emoji become two escapes in JavaScript style?
Because the classic four-digit form can only address the first 65536 code points. Anything above that must be written as a UTF-16 surrogate pair – two escapes for one character. The ES6 brace form and Python capital-U form express it as a single escape instead.
Which style should I pick?
Match your target: the brace form for modern JavaScript, the four-digit form for Java and older JavaScript, the backslash-hex form for CSS where a trailing space terminates the escape, and the capital-U form for Python when the character is above the basic plane.
Why escape at all if my files are UTF-8?
Usually you should not – readable text is better. Escaping earns its keep when a build pipeline, a legacy system or a configuration format cannot be trusted to preserve encoding, or when you need to make an invisible character explicit in source code.