Unicode Escape & Unescape — \uXXXX, \u{…}, HTML Entities

Convert text to Unicode escape sequences and back. Output as \uXXXX, \u{…} or HTML entities — and paste any of them mixed together to decode. Surrogate pairs (emoji) handled correctly. Runs entirely in your browser.

Edit either box. Decoding auto-detects \uXXXX, \u{…}, \xXX and &#…; entities, even mixed together.

What a Unicode escape is

Every character has a code point — a number Unicode assigns it. A is U+0041, é is U+00E9, is U+4E16, the rocket 🚀 is U+1F680. A Unicode escape writes that number in a form a programming language or markup can read: é in JavaScript or JSON, \u{1f680} in ES6, 🚀 in HTML. The visible character and its escape are two spellings of the exact same thing.

Why you'd escape text

Gotchas worth knowing

Frequently asked questions

How do I unescape \uXXXX to text?

Paste the escaped string into the Escaped box; the decoded text appears instantly. It accepts \uXXXX, \u{…}, \xXX and HTML &#…; entities, even several formats mixed in one string.

Why is one emoji two \u escapes?

Because \uXXXX can only encode values up to U+FFFF. Emoji live above that range, so they're stored as a surrogate pair — two 16-bit halves that together form one character.

What's the difference between \uXXXX and \u{…}?

\uXXXX is fixed at four hex digits (JavaScript/JSON classic). \u{…} (ES6) takes a variable-length code point, so a single escape covers any character including emoji.

Need other text utilities? Browse all tools on the home page.