Text with non-ASCII characters

Escaped Unicode text

What is Unicode escaping?

Unicode escaping is the process of representing non-ASCII characters using escape sequences in the form \uXXXX, where XXXX is the hexadecimal code point of the character. This makes it possible to include any Unicode character in contexts that only support ASCII, such as certain programming languages, data formats, or legacy systems.

Examples of Unicode escaping

Original text with non-ASCII characters

Café au lait - French coffee with milk
Résumé - Summary of qualifications
こんにちは - Hello in Japanese
你好 - Hello in Chinese
Привет - Hello in Russian
안녕하세요 - Hello in Korean
Γειά σου - Hello in Greek
مرحبا - Hello in Arabic
שלום - Hello in Hebrew
Olá - Hello in Portuguese

Converted to escaped Unicode

Caf\u00e9 au lait - French coffee with milk
R\u00e9sum\u00e9 - Summary of qualifications
\u3053\u3093\u306b\u3061\u306f - Hello in Japanese
\u4f60\u597d - Hello in Chinese
\u041f\u0440\u0438\u0432\u0435\u0442 - Hello in Russian
\uc548\ub155\ud558\uc138\uc694 - Hello in Korean
\u0393\u03b5\u03b9\u03ac \u03c3\u03bf\u03c5 - Hello in Greek
\u0645\u0631\u062d\u0628\u0627 - Hello in Arabic
\u05e9\u05dc\u05d5\u05dd - Hello in Hebrew
Ol\u00e1 - Hello in Portuguese

Common Unicode escape sequences

CharacterUnicode escapeDescription
é\u00e9Latin small letter e with acute
ñ\u00f1Latin small letter n with tilde
ö\u00f6Latin small letter o with diaeresis
\u20acEuro sign
\u3042Hiragana letter a
\u4e2dCJK unified ideograph (middle)
Б\u0411Cyrillic capital letter be
α\u03b1Greek small letter alpha

When to use Unicode escaping

  • When working with programming languages or environments that require ASCII-only source code
  • When creating JSON or other data formats that need to be portable across different systems
  • When storing text in databases or files that don't fully support Unicode
  • When debugging issues related to character encoding
  • When creating configuration files that need to be edited in environments with limited Unicode support

Unicode escaping in different programming languages

LanguageUnicode escape formatExample
JavaScript\uXXXXvar text = "Caf\u00e9";
Java\uXXXXString text = "Caf\u00e9";
C#\uXXXXstring text = "Caf\u00e9";
Python\uXXXX or \UXXXXXXXXtext = "Caf\u00e9"
Ruby\uXXXXtext = "Caf\u00e9"

Note:

While Unicode escaping makes text compatible with ASCII-only environments, it makes the text less readable for humans. Use it when technical compatibility is required, but prefer direct Unicode when possible in modern systems that fully support it.

Related Tools

All Tools

See all available tools