# Unicode Escape Decoder

> Decode \uXXXX, \u{…} and \xNN escape sequences into readable Unicode text.

- Page: https://decoder.tools/unicode-escape-decoder
- Category: Data, Radix & String
- Status: live, runs in the browser
- Last reviewed: 2026-10-23

A Unicode escape decoder replaces escape sequences such as `é`, `\u{1F680}` and `\x41` with the characters they encode, turning escaped source-code strings back into readable text.

## Example

```text Input
Café ☕ \u{1F680} \x41
```

```text Output
Café ☕ 🚀 A
```

## Where these escapes come from

Programming languages and data formats escape characters that are awkward to type or that the file encoding can't hold:

- **`\uXXXX`** (exactly four hex digits) is used by JSON, JavaScript, Java and C#. It names a UTF-16 code unit, so characters outside the Basic Multilingual Plane, such as most emoji, need a **surrogate pair**: 🚀 is `🚀`.
- **`\u{XXXXX}`** (one to six hex digits) is the ES2015 JavaScript form. It takes the full code point, so 🚀 is simply `\u{1F680}`.
- **`\xNN`** (two hex digits) is a single byte or Latin-1 character in JavaScript, Python and C.

You typically see these when a JSON file was written with ASCII-only output (Python's `json.dumps` does this by default), in minified JavaScript, in log files and in API responses viewed raw.

## How to use the Unicode escape decoder

1. Paste the escaped string. You can include the surrounding text.
2. Read the decoded result. All three escape styles are converted in one pass.
3. Surrogate pairs such as `🚀` combine into a single emoji automatically.

## Decode Unicode escapes in code

```python Python
import json

print(json.loads('"Caf\\u00e9 \\u2615 \\ud83d\\ude80"'))  # Café ☕ 🚀
```

```js JavaScript (Node.js)
console.log(JSON.parse('"Caf\\u00e9 \\u2615 \\ud83d\\ude80"')); // Café ☕ 🚀
```

## Unicode escapes at a glance

| | |
|---|---|
| `\uXXXX` | UTF-16 code unit (JSON, JavaScript, Java, C#) |
| `\u{X…}` | Full code point, 1 to 6 hex digits (JavaScript ES2015+) |
| `\xNN` | One byte / Latin-1 character (JavaScript, Python, C) |
| Characters above U+FFFF | Need a surrogate pair with `\uXXXX` |

## FAQ

### Why does an emoji become two \u escapes?

`\uXXXX` can only express values up to U+FFFF. Emoji live above that, so UTF-16 splits them into two code units called a surrogate pair. `🚀` is the pair for 🚀 (U+1F680).

### How do I stop Python from writing \u escapes in JSON?

Pass `ensure_ascii=False` to `json.dumps`. The output then contains the actual characters, which is fine as long as the file is saved as UTF-8.

### Is é the same as &#233; or %C3%A9?

They all mean `é`, written for different contexts: `é` in source code and JSON, `&#233;` in HTML (use the [HTML entity decoder](/html-entity-decoder)) and `%C3%A9` in URLs (use the [URL decoder](/url-decoder)).
