What it does
The Unicode Escape tool converts text to escape sequences and back. It supports the formats used by JSON and JavaScript (\uXXXX), ES6 (\u{XXXXX}), Python, CSS, XML and HTML character references (&#NNNN; and &#xXXXX;) and plain code points (U+XXXX). It can escape only non-ASCII characters, or everything.
How to use it
- Paste text, JSON or XML into Text / JSON / XML, or click Load sample.
- Choose the Format.
- Choose the Scope: Non-ASCII only, All chars in string values / text (which leaves JSON keys and XML tags readable), or Every character.
- Copy the Escaped result. Paste escaped text into the right-hand side to decode it.
Example
Text: Café ✓ 😀
| Format | Result |
|---|---|
| JSON / JavaScript | Caf\u00E9 \u2713 \uD83D\uDE00 |
| ES6 | Caf\u{E9} \u{2713} \u{1F600} |
| XML / HTML hex | Café ✓ 😀 |
Good to know
- Characters outside the Basic Multilingual Plane, such as emoji, become a surrogate pair (two
\uescapes) in JSON and older JavaScript. - Escaping makes files safe for systems that only accept ASCII, such as some older databases, log pipelines and
.propertiesfiles. - For HTML special characters such as
<and&, the HTML Entities tool is a better fit.
FAQ
Why does my JSON show \u00E9 instead of é?
Some serializers escape all non-ASCII characters. Paste the JSON here to decode it into readable text.
Is escaped JSON still valid JSON?
Yes. \uXXXX escapes are part of the JSON standard.