Skip to content
\u

Unicode Escape

Convert between text and \uXXXX / \u{XXXXX} escapes.

Non-BMP format

JS string-literal compatible. Emoji become two units like \uD83D\uDE00.

\u3053\u3093\u306B\u3061\u306F \u4E16\u754C \uD83D\uDE00

About Unicode Escape

Unicode escapes represent characters as hex sequences like \u3042 or \u{1F600}. They show up in JavaScript string literals, JSON, logs, i18n catalogs, and obfuscated source. toco.tools converts plain text and escape sequences both ways. BMP characters become \uXXXX; non-BMP characters (emoji and beyond) default to UTF-16 surrogate pairs (\uD83D\uDE00) for JS-string compatibility, with an optional ES6 code-point form \u{1F600}. You can leave ASCII readable or escape everything, and choose upper or lower hex digits. Decode understands \uXXXX, \u{XXXXX}, and surrogate pairs. Invalid fragments are kept as-is by default; strict mode surfaces an error instead. Everything runs locally in your browser—nothing is uploaded.

How to use

  1. Paste text or escape sequences
  2. Choose Encode/Decode and non-BMP format options
  3. Copy the result

FAQ

What’s the difference between \uXXXX and \u{XXXXX}?

\uXXXX is a fixed 4-digit UTF-16 code unit. \u{XXXXX} is the ES6 code-point form that can represent emoji in one escape.

How are emoji encoded?

By default as UTF-16 surrogate pairs (e.g. \uD83D\uDE00). Switch to ES6 form for \u{1F600}.

What happens with invalid escapes?

In normal mode, undecodable fragments stay as-is. Strict mode shows an error instead.

Is my data sent anywhere?

No. All conversion runs in your browser; nothing is sent to toco.tools servers.