Unicode Escape Sequences Studio
Convert Unicode text to ES6 (\u{1F680}), Java/C# surrogate pairs (🚀), Python (\U0001F680), and CSS escapes, or decode back to text.
Surrogate Pair & Multi-Language Escape Anatomy
| Glyph | Codepoint | ES6 JavaScript | Java / C# (Surrogates) | Python 32-bit | CSS Content |
|---|---|---|---|---|---|
| U | U+0055 | \u0055 | \u0055 | \u0055 | \000055 |
| n | U+006E | \u006E | \u006E | \u006E | \00006E |
| i | U+0069 | \u0069 | \u0069 | \u0069 | \000069 |
| c | U+0063 | \u0063 | \u0063 | \u0063 | \000063 |
| o | U+006F | \u006F | \u006F | \u006F | \00006F |
| d | U+0064 | \u0064 | \u0064 | \u0064 | \000064 |
| e | U+0065 | \u0065 | \u0065 | \u0065 | \000065 |
| U+0020 | \u0020 | \u0020 | \u0020 | \000020 | |
| 1 | U+0031 | \u0031 | \u0031 | \u0031 | \000031 |
| 6 | U+0036 | \u0036 | \u0036 | \u0036 | \000036 |
| . | U+002E | \u002E | \u002E | \u002E | \00002E |
| 0 | U+0030 | \u0030 | \u0030 | \u0030 | \000030 |
| : | U+003A | \u003A | \u003A | \u003A | \00003A |
| U+0020 | \u0020 | \u0020 | \u0020 | \000020 | |
| R | U+0052 | \u0052 | \u0052 | \u0052 | \000052 |
| o | U+006F | \u006F | \u006F | \u006F | \00006F |
| c | U+0063 | \u0063 | \u0063 | \u0063 | \000063 |
| k | U+006B | \u006B | \u006B | \u006B | \00006B |
| e | U+0065 | \u0065 | \u0065 | \u0065 | \000065 |
| t | U+0074 | \u0074 | \u0074 | \u0074 | \000074 |
| U+0020 | \u0020 | \u0020 | \u0020 | \000020 | |
| 🚀 | U+1F680 | \u{1F680} | 0xD83D + 0xDE80 | \U0001F680 | \01F680 |
| U+0020 | \u0020 | \u0020 | \u0020 | \000020 | |
| & | U+0026 | \u0026 | \u0026 | \u0026 | \000026 |
| U+0020 | \u0020 | \u0020 | \u0020 | \000020 |
The Architecture of Unicode Escape Sequences in Compilers & Runtimes
When software compilers, source code files, and JSON payloads are transmitted across 7-bit ASCII channels, international Unicode characters can be corrupted by encoding mismatches. Unicode escape sequences allow programmers to represent any Unicode character purely with ASCII letters, digits, and backslashes:
\u0627 for Urdu Alif).U+1F680) require either ES6 curly braces (\u{1F680}) or 16-bit surrogate pairs.The Mathematics of UTF-16 Surrogate Pairs (U+D800 – U+DFFF)
In Java, C#, and ES5, characters > U+FFFF are divided into two 16-bit surrogate code units:
0xD800 + ((U' - 0x10000) >> 10) (Range: 0xD800–0xDBFF)0xDC00 + ((U' - 0x10000) & 0x3FF) (Range: 0xDC00–0xDFFF)0xD83D, Low = 0xDE80 → 🚀Frequently Asked Questions (FAQs)
Why does "🚀".length return 2 in JavaScript and Java?+
JavaScript and Java strings are internally represented in UTF-16 code units. Because the Rocket emoji (U+1F680) resides in the astral plane, it requires two 16-bit surrogate code units (🚀), causing string.length to return 2 instead of 1.
How do I use Unicode escapes in CSS pseudo-elements (::before / ::after)?+
In CSS, use a backslash followed by the hex codepoint (e.g. content: "\1F680" or content: "\2022"). Select the "CSS Content" mode to generate valid CSS escape literals.
Can this tool decode JSON payloads containing escaped strings?+
Yes! Paste your JSON escaped strings (e.g. {"msg": "\u0627\u0631\u062F\u0648"}) and select "Decode" to view the readable Unicode text.