Developer ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Developer Tools

Unicode Escape Converter

Convert text to \u00E9, \u{1F600}, U+00E9, é, CSS or UTF-8 byte escapes, or decode them back to text, with a code point, UTF-8 and UTF-16 table.

View all tools
ResultUpdates as you type
Caf\u00E9 \u2615 \uD83D\uDE00

8 code points (JavaScript length 9, 14 UTF-8 bytes).

CharacterCode pointDecimalUTF-8UTF-16Category
CU+004367430043Letter
aU+006197610061Letter
fU+0066102660066Letter
éU+00E9233C3 A900E9Letter
(space/control)U+002032200020Space
☕U+26159749E2 98 952615Symbol
(space/control)U+002032200020Space
😀U+1F600128512F0 9F 98 80D83D DE00Symbol

How to use Unicode Escape Converter

Type text to encode it, or paste escapes to decode them; the direction is detected automatically. Choose the output format for your language, and a table lists each character's code point, UTF-8 bytes and UTF-16 units.

  1. Enter text or escapesType text such as Café, or paste sequences such as \u00E9, \u{1F600}, U+00E9, é or é.
  2. Choose a formatPick U+ code points, \u for JavaScript and JSON, \u{…} for ES6 and Rust, Python, HTML hex or decimal, CSS or UTF-8 bytes.
  3. Fine-tune and copyLeave ASCII as it is or escape every character, choose lower-case hex if you prefer, then copy the result.

Escape formats compared

Take Café, the hot drink symbol U+2615 and the grinning face emoji U+1F600. JavaScript, JSON and Java give Caf\u00E9 \u2615 \uD83D\uDE00, where the emoji needs a UTF-16 surrogate pair; ES6, Rust and Swift Caf\u{E9} \u{2615} \u{1F600}; Python and C Caf\u00E9 \u2615 \U0001F600; HTML Café ☕ 😀 in hex or Café ☕ 😀 in decimal; CSS \E9, \2615 and \1F600; and UTF-8 bytes Caf\xC3\xA9 \xE2\x98\x95 \xF0\x9F\x98\x80, as seen in C strings and logs. U+ mode lists every code point instead, such as U+00E9 and U+1F600.

Decoding mixed escapes

Decoding understands \uXXXX (including surrogate pairs), \u{…}, \UXXXXXXXX, runs of \xXX UTF-8 bytes, U+XXXX and HTML numeric entities, even when they are mixed in one string: Caf\u00E9 U+2615 😀 decodes to Café followed by the hot drink symbol and the grinning face emoji, and reports 3 sequences. CSS escapes are decoded when the format is set to CSS. If the result contains an unpaired surrogate, usually half of an emoji copied on its own, you get a warning. When encoding, the table under the output shows each character's code point, decimal value, UTF-8 bytes, UTF-16 units and category.

Accuracy and data handling

Validate the result with your project's own tests and runtime rules before using it in production. The calculation runs in your current browser; the tool code does not send the input to a processing API.

Often Used Together

Next step

FAQ

Why does an emoji become two \u escapes?

JavaScript, JSON and Java strings use UTF-16, so characters above U+FFFF need a surrogate pair: the grinning face emoji U+1F600 is \uD83D\uDE00. The ES6 format writes it as a single \u{1F600}.

What is the Unicode code point of é?

é is U+00E9, or 233 in decimal. In UTF-8 it takes two bytes, C3 A9, and in HTML you can write it as é or é.

Do letters and digits need escaping?

Usually not. Leave ASCII letters, digits and punctuation as they are is ticked by default, so only other characters are escaped. Untick it to escape everything: Hi becomes \u0048\u0069.

More Developer Tools

Related tools