ToolWren logo ToolWren
ToolWrenGuides › Unicode Escapes Explained: How to Decode \uXXXX

Unicode Escapes Explained: How to Decode \uXXXX

Encoding · Developers · Updated 14 August 2026

If you have ever opened a JSON file or log and seen something like caf\u00e9 instead of "café", you have met Unicode escapes. They look cryptic but the rule is simple, and decoding them takes seconds.

What a \uXXXX escape is

A Unicode escape represents a single character by its code point — its number in the Unicode standard — written as \u followed by four hexadecimal digits. So \u00e9 is code point U+00E9, which is é. This lets a file stay pure ASCII while still carrying any character in the world, which is why JSON and most programming languages use it.

How to decode \uXXXX to text

Paste the escaped string into our Unicode escape converter and every \uXXXX sequence turns back into its character instantly. \u0068\u0069 becomes "hi". It also understands the two-digit \xXX form you sometimes see for characters below 256.

How to encode text to \uXXXX

Going the other way, type or paste your text and the encoder replaces every character outside printable ASCII with its \uXXXX escape, leaving plain ASCII untouched. This is handy when you need to embed non-English text safely in source code or a config file.

Emoji and surrogate pairs

Characters above U+FFFF — most emoji, for instance — do not fit in four hex digits. They are represented as a surrogate pair: two \uXXXX escapes together. That is exactly how JSON encodes them, and the converter handles the round-trip automatically, so 😀 becomes \ud83d\ude00 and back.

Related encodings

Unicode escapes are one of several ways to represent text as safe characters. For raw bytes, see the hex converter; for binary-to-text, the Base64 tool; and to look up a single character's code, the ASCII table. None of these change data's security — they only change its representation. Everything runs in your browser.

More guides