Unicode Escape Converter

Turn non-ASCII characters into \uXXXX, \u{X}, U+XXXX, HTML or CSS escapes, or turn any of those escapes back into characters.

Processed on your device. Files are not uploaded

How to escape or unescape Unicode

  1. Paste your text or escapes

    Paste or type it into the box, or press Try an example.

  2. Pick the style

    JavaScript, ES6, Python, U+, HTML or CSS.

  3. Copy or download

    Paste it into your code.

Worked example

This is what Unicode Escape Converter gives for its own sample values. Open the tool above and change anything to try your own.

Text or escapes

café, naïve, 日本語, 😀
Direction
Escape characters
Style
\uXXXX (JavaScript, Java, JSON)
Escape every character, not only non-ASCII
No

Result

caf\u00E9, na\u00EFve, \u65E5\u672C\u8A9E, \uD83D\uDE00

About Unicode Escape Converter

Replace characters outside ASCII with escapes for source code or HTML, or decode any mix of escapes back into characters. Emoji and other characters above U+FFFF become surrogate pairs where the style needs them.

FAQs

Which style do I need?

\uXXXX for JavaScript, Java and JSON, \u{...} for modern JavaScript, and &#x...; for HTML.

Can it decode a mix of styles?

Yes. All of these forms are decoded at once.

What about HTML named entities?

Use HTML Entity Encoder / Decoder.

Related tools