Text to Unicode
Convert text to Unicode code points or HTML entities, and decode them again.
Loading tool…
About the text to unicode
Converts text to JavaScript escapes, U+ code points, HTML entities or CSS escapes, and decodes all four formats back to readable text. Useful for embedding awkward characters in source files, or working out exactly what an unexpected glyph is.
Frequently asked questions
Why does an emoji become two escape sequences?
JavaScript strings are UTF-16. Characters above U+FFFF are stored as a surrogate pair, so they need two \uXXXX escapes. The code point view shows the single real value.
When should I escape characters in source?
When the character is invisible or easily confused — non-breaking spaces, zero-width joiners, right-to-left marks. Ordinary accented text is clearer left as-is in a UTF-8 file.