TSToolSeta
Developer Tools · Ready

Unicode Escape Converter

Convert Unicode text to code-point or JavaScript escape notation.

Workbench online
Loading tool controls…

Unicode Escape Converter guide

Represent Unicode text as JavaScript escapes or U+ code points, and decode supported notation back into text.

What this tool does

The Unicode Escape Converter reads text by Unicode code point. Encoding can produce JavaScript-style \uXXXX escapes for values in the Basic Multilingual Plane and \u{...} escapes for larger values, or a space-separated sequence of U+XXXX code-point labels. Decoding recognizes those forms plus two-digit \xXX escapes inside otherwise ordinary text.

The tool counts code points rather than visible grapheme clusters. A flag, skin-tone sequence, family emoji, or accented character built with combining marks can contain several code points even when it appears as one symbol. Encoding therefore may produce multiple escapes for one visible character.

Decoding replaces supported escape patterns wherever they appear and leaves other text unchanged. It validates scalar ranges for braced and U+ notation. Fixed four-digit JavaScript escapes can represent UTF-16 surrogate code units, allowing a correctly paired surrogate sequence to render as one supplementary character.

How to use it

  1. Choose Text to escapes or Escapes to text.
  2. When encoding, choose JavaScript notation or U+ code points.
  3. Paste the source value.
  4. Select Convert Unicode.
  5. Inspect and copy the exact output.

Escaping rules vary across JSON, JavaScript, CSS, HTML, URLs, regular expressions, and programming languages. This tool does not automatically make a value safe for all those contexts. Use the encoder defined for the final syntax.

Benefits

  • Supports full Unicode code points
  • Offers JavaScript and U+ output styles
  • Decodes several common escape forms
  • Handles supplementary emoji with braced notation
  • Reports how many code points or escapes were processed
  • Keeps all text in the browser

Character identity and appearance

Different code-point sequences can look identical, and fonts can render the same code point differently. The converter does not normalize text, identify Unicode names, detect confusable characters, or assess bidirectional security. Preserve the original when exact byte or normalization identity matters.

FAQ

Many emoji are sequences containing multiple code points, variation selectors, skin tones, or joiner characters.

U+ notation labels code points for documentation. JavaScript escape syntax can be placed in suitable JavaScript string source.

No. HTML uses different escaping rules. Use context-appropriate HTML entity encoding and safe DOM APIs.

No. It preserves the input sequence and does not combine or decompose canonically equivalent characters.

No. Code-point iteration, escape conversion, validation, and copying run locally.

Keep working

Related tools

View all Developer Tools