Files converted in total: 0 (0 GB)Today: 0 (0 GB)

Unicode escapes (\u): encode and decode

Convert text to Unicode escapes (\u00e9, \u{1F600}, U+00E9) and escapes back to text, for code and JSON data.

Guide: Unicode escapes (\u): encode and decode

When to use it

When you need text with accents or emoji in a file that only supports ASCII, or want to read a JSON string full of \uXXXX.

Tips

  • By default only what is not ASCII is escaped; turn on the option to escape everything.
  • Emoji and other large characters are written as a surrogate pair (\uD83D\uDE00) or with braces.
  • When decoding, \uXXXX, \u{X} and U+XXXX are understood.

Frequently asked questions

What is a surrogate pair?

A way to write characters outside the basic plane with two 16-bit units, as JavaScript does.