Unicode Escape Converter

Paste text or escape codes and they are converted as you type.

Your text and files never leave your browser — nothing is sent to a server.

How to use

  1. Paste your text and choose an escape format. By default only non-ASCII characters are converted, so plain English stays readable.
  2. \uXXXX writes characters outside the Basic Multilingual Plane, such as emoji, as two surrogate halves — the form JavaScript strings and JSON expect.
  3. U+XXXX lists every character as a code point separated by spaces, handy for looking characters up.
  4. Turn on “Convert ASCII too” to escape every character, including letters and digits.
  5. To decode, switch modes — \uXXXX, \u{…}, \UXXXXXXXX, \xXX, U+XXXX, &#x…; and &#decimal; can all be mixed in one input. CSS escapes (\XXXX) are decoded only when the CSS format is selected, so Windows paths stay intact.

FAQ

Why does one emoji become two \u codes?

JavaScript and JSON store text as UTF-16. Characters above U+FFFF, such as most emoji, need two 16-bit units called a surrogate pair, for example \ud83d\ude00 for 😀.

Why is there sometimes a space after a CSS escape?

A CSS escape can be up to six hex digits long. If the next character is a hex digit or a space, a single space marks where the escape ends, and browsers drop that space when rendering.

What is the difference between U+ and \u?

U+1F600 is the standard way to name a code point in documentation. \u is the escape syntax used inside program code; ES6 \u{1F600} can hold a full code point directly.

Related tools

All tools