DocumentsImagesMediaPDF Tools

Unicode Escape Converter

Convert text to Unicode escape sequences and back in your browser.

Processed in your browser — no text sent to any server

Unicode text ↔ escape sequences

JSON and JS formats

Generate \uXXXX escapes compatible with JSON, Java, C#, and JavaScript ES5, or the new \u{} from ES6.

100% private

Encoding and decoding happen in your browser. No data leaves your device.

Emoji support

Correctly handles UTF-16 surrogate pairs and code points outside the BMP (emojis, extended unified CJK).

Instant

Results update in real time as you type or paste content.

Three steps, no hassle

1

Enter your text or escapes

Paste the text you want to convert to Unicode escapes (like \u0048\u0065\u006C\u006C\u006F), or paste the escape sequences you want to decode back to readable text.

2

Select conversion mode

Choose 'Text → Escape' to encode or 'Escape → Text' to decode. You can choose between \uXXXX format (BMP) and \u{XXXXX} (ES6, supports emojis and characters outside the BMP).

3

Copy the result

The result appears in real time. Use the copy button to take it to your clipboard.

Got questions?

They are textual representations of Unicode characters using only ASCII characters. The \uXXXX format represents a Unicode code point with four hexadecimal digits (covers the BMP, the first 65536 characters). Example: \u0041 = 'A', \u00E9 = 'é', \u4E2D = '中'. They are used when the target system does not directly support non-ASCII characters.

\uXXXX is the classic format covering the BMP (U+0000 to U+FFFF). It works in JSON, Java, C#, JavaScript ES5, and Python. \u{XXXXX} is the extended ES6 (ECMAScript 2015) format that supports any Unicode code point, including characters outside the BMP like emojis (🎉 = \u{1F389}). Use it when you need compatibility with supplementary characters in modern JavaScript.

JSON requires files to be ASCII or UTF-8 but allows \uXXXX escapes to represent any character. This guarantees interoperability when the communication channel does not handle Unicode well. In JavaScript, escapes are useful in strings with problematic characters, in regular expressions, and when source code must be pure ASCII due to system requirements.

Emojis and many additional Asian characters are outside the BMP (U+10000 to U+10FFFF). In \uXXXX format they are represented as surrogate pairs: two consecutive \uXXXX values. For example, 🎉 = \uD83C\uDF89. This is what JavaScript ES5 generated internally. With \u{1F389} (ES6), the confusion of surrogate pairs is avoided and the direct code point is used.

In internationalization (i18n), Java .properties files historically required non-ASCII characters to be in \uXXXX format. The native2ascii tool converted files with native characters to this format. Since Java 9, .properties files support UTF-8 directly. Still, many legacy projects maintain the escape format and this converter makes it easy to work with them.

Unicode: history (1991), UTF-8 encoding, and escapes in programming languages

Unicode was created to solve the chaos of incompatible encodings: ASCII (1963, only 128 characters), Latin-1, Big5, Shift-JIS, KOI8-R... each region used its own system. The Unicode Consortium was formed in 1988 and published the first version of the standard in 1991, with the goal of assigning a unique number (code point) to every character in all the world's writing systems. Unicode 15.1 currently defines over 149,000 characters.

UTF-8, designed by Ken Thompson and Rob Pike in 1992, became the dominant encoding on the Internet due to its ASCII compatibility and efficiency for Western text. In 2008 it surpassed Latin-1 as the most used encoding on the web, and since 2012 it is the encoding of over 90% of all web pages. The \uXXXX escape sequences allow any Unicode character to be represented within pure ASCII strings.

Every modern programming language has its own Unicode escape syntax: Python uses \uXXXX and \UXXXXXXXX, Java and C# use \uXXXX, JavaScript ES5 uses \uXXXX with surrogate pairs for the extended BMP, ES6 introduced \u{XXXXX}, and Rust uses \u{XXXXX}. JSON files must be UTF-8 and allow \uXXXX for any character, making this converter especially useful when working with internationalized APIs or configuration files.