Skip to main content
I
Uni
UNICODE
Tools/Unicode Escape

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.

3Escape Entities Detected
2Astral Plane Glyphs (> U+FFFF)
34Total Unicode Codepoints
es6Target Syntax
Programming Language / Escape Standard:
Quick Presets:
Font Size (16px):
Plain Unicode Text (To Encode)Live Input Buffer
Generated Escape Literals Output
Unicode 16.0: Rocket \u{1F680} & Stars \u2605 \u{1F496}

Surrogate Pair & Multi-Language Escape Anatomy

GlyphCodepointES6 JavaScriptJava / C# (Surrogates)Python 32-bitCSS Content
UU+0055\u0055\u0055\u0055\000055
nU+006E\u006E\u006E\u006E\00006E
iU+0069\u0069\u0069\u0069\000069
cU+0063\u0063\u0063\u0063\000063
oU+006F\u006F\u006F\u006F\00006F
dU+0064\u0064\u0064\u0064\000064
eU+0065\u0065\u0065\u0065\000065
U+0020\u0020\u0020\u0020\000020
1U+0031\u0031\u0031\u0031\000031
6U+0036\u0036\u0036\u0036\000036
.U+002E\u002E\u002E\u002E\00002E
0U+0030\u0030\u0030\u0030\000030
:U+003A\u003A\u003A\u003A\00003A
U+0020\u0020\u0020\u0020\000020
RU+0052\u0052\u0052\u0052\000052
oU+006F\u006F\u006F\u006F\00006F
cU+0063\u0063\u0063\u0063\000063
kU+006B\u006B\u006B\u006B\00006B
eU+0065\u0065\u0065\u0065\000065
tU+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:

1. Basic Multilingual Plane (BMP $\le$ U+FFFF):Represented uniformly as 4 hex digits (e.g. \u0627 for Urdu Alif).
2. Supplementary Astral Planes (> U+FFFF):Emojis and historic scripts (e.g. 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:

High Surrogate: 0xD800 + ((U' - 0x10000) >> 10) (Range: 0xD800–0xDBFF)
Low Surrogate: 0xDC00 + ((U' - 0x10000) & 0x3FF) (Range: 0xDC00–0xDFFF)
Example 🚀 (U+1F680): High = 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.