Developer Tools

Unicode Escape Converter

Inspect the difference between a Unicode code point and a UTF-16 code unit. Convert text to fixed-width \uXXXX sequences or brace-style \u{...} sequences, with strict validation when turning escapes back into text.

Free online tool

Loading tool…

Code point lens

First 100 code points of the text; spaces and combining marks may appear blank.

A · U+0041 · U+0020c · U+0063a · U+0061f · U+0066é · U+00E9 · U+0020😀 · U+1F600

Decode accepts both Unicode forms and plain text. It rejects unpaired surrogates, out-of-range points, and other backslash escapes such as \n. Fixed-width escapes form the Unicode portion of JSON escaping; this tool does not produce a quoted JSON string. Limit: 250,000 UTF-16 code units.

Conversions run locally in your browser. This tool does not upload input or save it to browser storage.

GET STARTED

How to use the Unicode Escape Converter

  1. 01

    Choose text-to-escapes or escapes-to-text.

  2. 02

    For encoding, select fixed-width UTF-16 or brace-style code points. Keep printable ASCII if you only need to expose the other characters.

  3. 03

    Paste text or Unicode escapes. Decode accepts either escape style in the same input.

  4. 04

    Review the code point lens, then copy or download.

Examples

An emoji has two UTF-16 units

😀 becomes \uD83D\uDE00 in fixed-width mode and \u{1F600} in brace mode. Both decode to the same code point.

A combining sequence stays a sequence

The decomposed text e followed by U+0301 becomes \u0065\u0301. This tool does not normalize it into the single code point U+00E9.

Code points and code units

UTF-16 represents code points above U+FFFF with a pair of 16-bit code units. Brace notation names the whole code point directly. The lens shows code points, which can still differ from the visible grapheme clusters a reader thinks of as characters.

This is an escape converter, not a parser

The decoder accepts ordinary text and Unicode escapes. It does not interpret quotes, concatenate literals, execute JavaScript, or process other backslash escapes such as \n or \x41. To represent a literal backslash here, use \u005C.

Well-formed text is required

An isolated high or low surrogate is rejected. Brace escapes must name scalar values no greater than U+10FFFF. Fixed-width escapes can form a valid surrogate pair, but the final decoded text must be well formed.

What to know

  • 250,000 UTF-16 code units per input.
  • Only Unicode backslash escapes are supported; no Unicode normalization is applied.

Common questions

Can I paste this output directly into JSON?

Fixed-width Unicode escapes can appear inside a JSON string, but this tool does not add the required surrounding quotes or validate an entire JSON document. Brace escapes are not JSON syntax.

Why does one visible emoji show several code points?

Emoji sequences can combine a base character, modifiers, joiners, and other points. Escaping preserves each point rather than merging the visible sequence.

Does printable ASCII include backslashes?

The keep-ASCII option leaves visible ASCII unchanged except backslash. Backslashes are always escaped so decoding remains unambiguous.

Sources & references