How to use the Unicode decoder
- Paste the escaped text into Text with escapes. Plain words around the escapes are fine.
- The Decoded text appears straight away, with every escape it recognises replaced by its character.
- Copy the result. Anything that is not a recognised escape is passed through unchanged.
What it does and when to use it
Escaped text turns up in many places: JSON from an API that writes \u00e9 instead of é, a log line full of \uD83D\uDE00, a Java properties file, Python source with \U0001F600, or a design spec that lists characters as U+2192. This tool makes all of those readable in one step, so you can check what a string really says.
It is the reverse of the Unicode encoder. If you want to know more about a single decoded character, such as its official name, block and UTF-8 bytes, paste it into the Unicode character lookup. For text that also contains named HTML entities like é, use the HTML decoder instead, because this tool decodes only the numeric forms.
How it works
The decoder runs a series of search-and-replace passes in a fixed order:
- Surrogate pairs written as two \u escapes are joined into one character first, so emoji come out whole.
\u{…}and\Uplus eight digits are decoded as full code points.- Remaining
\uXXXXescapes become single UTF-16 units. A run of\xXXescapes is decoded as UTF-8 bytes, or as Latin-1 characters when the bytes are not valid UTF-8. U+XXXXcodes are decoded. A single space between two U+ codes is treated as a separator and removed; a space before ordinary text is kept.- Hex and decimal HTML references are decoded last.
Code points above U+10FFFF, and surrogate values in the full code point forms, are left as written. It all runs in your browser.
Worked examples
Caf\u00E9 \u2713 \uD83D\uDE00 \u{1F44B} U+1F680 → Café ✓ 😀 👋 🚀
\x48\x69 \U0001F600 → Hi 😀
Price: €5 €5 → Price: €5 €5
\xc3\xa9 → é
The first line mixes four styles in one string, which is common when text has passed through several systems. The last line shows two byte escapes read together as the UTF-8 encoding of é.
Limits and tips
- The space between U+ codes is dropped, but not the one before a word, so
U+0048 U+0069 theredecodes to “Hi there”. - If the output still contains odd pairs such as é or ’, the text was decoded with the wrong character set somewhere earlier. Look at its bytes in the hex dump viewer.
- Upper and lower case hex digits both work.
Frequently asked questions
Which escape formats does it understand?
Are \xXX escapes read as UTF-8 bytes?
Are \n and \t decoded?
What happens to an invalid code point?
Is this decryption?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.