Skip to content

Encode text as deterministic U+ code points or decode them back locally.

Loading tool

About Text to Unicode

Convert text into Unicode code points as U+XXXX values, \uXXXX escapes (UTF-16, as in JavaScript, JSON and Java), ES6 \u{X} escapes, HTML decimal or hex references, or CSS escapes. Decoding accepts a mix of U+, \u, \u{}, &#N; and &#xX; notations (and CSS escapes) and leaves other text in place. Emoji and other characters above U+FFFF stay a single U+ value but become surrogate pairs in \uXXXX format.

Common uses

  • Find the code point of an emoji or special character.
  • Write a non-ASCII character as an escape in JavaScript, JSON or CSS source.
  • Decode a string of \uXXXX escapes from a log or JSON file.
  • Spot invisible or look-alike characters by listing every code point.

FAQ

What is a Unicode code point?
A code point is the number Unicode assigns to a character, written as U+ followed by hex digits, such as U+0041 for A or U+1F600 for the grinning face emoji. Code points range from U+0000 to U+10FFFF.
Why does an emoji become two \u escapes?
\uXXXX represents a UTF-16 code unit. Characters above U+FFFF need two code units, called a surrogate pair, so U+1F600 is written \uD83D\uDE00. The ES6 form \u{1F600} avoids this.