Unicode Escaper & Unescaper

Convert text to and from Unicode escape sequences: JavaScript \\uXXXX, ES6 \\u{}, HTML entities, CSS escapes, UTF-8 bytes, and more. Private, fast, and free.

\uXXXXJavaScript/JSON 4-digit hex: \u0041 for A. Surrogate pairs for characters above U+FFFF.
0 chars
0 chars

Nine escape formats

Switch between \uXXXX, \u{…}, \xXX, U+, HTML entities, CSS escapes, hex literals, and UTF-8 bytes instantly.

Real-time conversion

See escaped or unescaped output as you type. No buttons to press, no network calls.

Private by design

All transformations run locally in your browser. Nothing is uploaded, stored, or logged.

Why escape Unicode characters?

Unicode contains over 149,000 characters across hundreds of writing systems, symbols, and emoji. While modern software handles most of them natively, many formats and protocols still require special encoding to safely transport or store non-ASCII text. Escaping transforms each character into an unambiguous sequence of ASCII characters that any parser can understand.

Format reference

FormatExample (A)Example (é)Example (🚀)
\uXXXX\u0041\u00E9\uD83D\uDE80
\u{…}\u{41}\u{E9}\u{1F680}
\xXX\x41— (out of range)— (out of range)
U+XXXXU+0041U+00E9U+1F680
&#xHH;Aé🚀
&#DD;Aé🚀
CSS \\0041 \00E9 \01F680
0xHH0x410xE90xD83D 0xDE80
UTF-8\x41\xC3\xA9\xF0\x9F\x9A\x80

Common use cases

  • Debugging JavaScript — inspect how strings containing emoji or CJK characters are represented in memory.
  • Writing international code — embed non-ASCII characters in source files that must remain pure ASCII.
  • HTML templating — encode characters as entities to avoid encoding mismatches or XSS risks.
  • CSS authoring — escape exotic characters in CSS selectors, custom property names, or content values.
  • Binary inspection — see the exact UTF-8 byte sequence that a given string produces.
  • Reverse engineering — decode escaped strings found in obfuscated scripts or network payloads.

Frequently asked questions

What is a Unicode escaper?

A Unicode escaper converts plain text into various Unicode escape sequences and vice versa. It supports JavaScript \uXXXX, ES6 \u{…}, HTML entities, CSS escapes, UTF-8 byte sequences, and more. All processing happens locally in your browser.

What is the difference between \uXXXX and \u{X…X}?

\uXXXX is the classic JavaScript/JSON escape format that uses exactly four hex digits. It can only directly represent characters up to U+FFFF (the Basic Multilingual Plane). Characters above U+FFFF require a surrogate pair of two \u escapes. \u{X…X} is the ES6 variable-length format that accepts any number of hex digits, so a single escape can represent any Unicode code point directly, including emoji and rare CJK characters.

How does UTF-8 byte escaping work?

UTF-8 is the most common text encoding on the web. Each character is encoded into 1 to 4 bytes. The UTF-8 escape mode shows those raw bytes as \xNN sequences. For example, the letter é (U+00E9) becomes \xC3\xA9 in UTF-8 because it requires two bytes. This is useful when working with low-level protocols, binary files, or debugging encoding issues.

When should I use HTML entities?

Use HTML hex or decimal entities (&#xHH; or &#DD;) when you need to embed special characters inside HTML or XML documents where raw characters might be parsed as markup. They are also useful when your document encoding does not support the character natively. For example, ♥ renders a heart symbol regardless of the page charset.

Is this tool safe for sensitive text?

Yes. Every conversion runs entirely in your browser using native JavaScript string and encoding APIs. No text is uploaded, logged, or stored on any server. You can safely process passwords, API keys, personal messages, or proprietary code.

What is CSS escaping used for?

CSS allows you to escape any character in identifiers (class names, IDs, custom properties) using a backslash followed by hex digits. For example, a class name that starts with a digit can be written as .\31 2col. The CSS escape mode shows how text would be encoded for use in CSS selectors or property names.

Why does \xXX only work for some characters?

The \xXX format uses exactly two hex digits, which means it can only represent values 0x00 through 0xFF (the Latin-1 / ISO-8859-1 range). Characters outside this range — such as most emoji, Chinese characters, or Arabic script — cannot be represented with \xXX alone and require \uXXXX, \u{…}, or UTF-8 encoding.

Can I unescape mixed formats?

The unescape mode is designed for a single format at a time. Select the format that matches your input (e.g., \uXXXX for JavaScript strings, &#x; for HTML entities) and the tool will decode it back to plain text. If your input contains a mix of formats, process each separately.

What does U+ notation mean?

U+ is the standard Unicode notation used in documentation and specification. U+0041 is the letter A, U+1F680 is the rocket emoji 🚀. It is not an escape format that programming languages parse automatically, but it is the clearest way for humans to refer to specific Unicode code points.

Part of our growing tool belt — all client-side, all free.