Unicode Escape / Unescape
Convert text to \uXXXX Unicode escape sequences and back online, including emoji and astral characters. Handy for JavaScript, JSON and Java strings.
Runs in your browser · Nothing uploadedFree · No sign-up
Something not working, or missing a feature? Send feedback
About the Unicode Escape / Unescape
Unicode escapes like \u00e9 let you write any character in ASCII-only source code, JSON and config files. This tool converts text to escape sequences and back, including emoji outside the Basic Multilingual Plane.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the Unicode Escape / Unescape
- Choose Escape or Unescape.
- Paste the text.
- Optionally escape plain ASCII too, then copy the result.
Example
Input
Café ☕ 😀
Result
Caf\u00e9 \u2615 \ud83d\ude00
ASCII letters stay as they are. é and ☕ become one escape each; the emoji, above U+FFFF, becomes a surrogate pair.
Common mistakes
- Escapes in Python and other languages. Python 3 writes characters above U+FFFF as \U0001F600, not a surrogate pair. The \uXXXX pairs here suit JavaScript, JSON and Java.
- Double backslashes. Text copied from a JSON string may contain \\u00e9 (an escaped backslash). Unescape it once more, or remove one backslash first.
- Invisible characters. Zero-width spaces, non-breaking spaces and byte order marks look like nothing but break comparisons. Escaping makes them visible as \u200b, \u00a0 or \ufeff.
Works well with the Unicode Escape / Unescape
- HTML Entity Encode / Decode: encode characters as HTML entities instead.
- URL Encode / Decode: percent-encode the same text for a URL.
- Word & Character Counter: count the UTF-8 bytes the text uses.
Frequently asked questions
How are emoji escaped?
Characters above U+FFFF, such as most emoji, become a surrogate pair of two \uXXXX escapes, as JavaScript and JSON require.
When do I need escapes?
When a file or system only accepts ASCII, or to make invisible characters visible while debugging.
What is a surrogate pair?
JavaScript strings use UTF-16, where characters above U+FFFF are stored as two 16-bit units. 😀 (U+1F600) becomes \ud83d\ude00.
Does it support \u{1F600} syntax?
Unescaping accepts both \u{1F600} and \uXXXX escapes, including surrogate pairs. Escaping always writes the four-digit form, because JSON and Java do not understand \u{…}.
Guides and tutorials
Related tools
Base64 Encode / Decode
Decode Base64 to text or encode text to Base64 online, with full UTF-8 and URL-safe Base64 support. Conversion runs in your browser, so nothing is uploaded.
URL Encode / Decode
URL encode or decode text online: percent-encode query string values and full URLs, or turn %20-style escapes back into readable text.
HTML Entity Encode / Decode
Encode special characters as HTML entities or decode entities such as & and < back to text. Escape user content safely before adding it to a page.
JWT Decoder & Verifier
Paste a JWT to decode its header and payload instantly, read exp and iat as dates and verify HS256 signatures. Tokens are decoded locally, never uploaded.
JWT Generator
Create signed JSON Web Tokens online with HS256, HS384 or HS512 from a custom header and payload. Signing happens in your browser; the secret stays local.
JSON Escape / Unescape
Escape text for use inside a JSON string, or unescape stringified JSON back to readable text. Handles quotes, backslashes, line breaks and Unicode escapes.