Unicode Escape Converter

Convert Unicode text into JavaScript, JSON, Python, Java, HTML, CSS, or U+ notation, or decode supported escape syntax back to characters.

Choose the syntax family explicitly because JavaScript, JSON, Python, Java, HTML, CSS, and Unicode notation use different rules.

Your text is processed in this browser and is not submitted to UnicodeNow.

Processed locally in your browser

Convert Unicode text to escape syntax, code-point notation, or HTML numeric character references, and decode supported representations back to text.

Operation

Each syntax is generated according to its own parser family, not as a generic entity format.

Advanced options

Escape conversion does not require normalization. Enable it only when you intentionally want to change the Unicode sequence.

Paste literal text or selected escape syntax. Input remains local to this browser.

What this Unicode escape converter does

This converter turns Unicode text into language and format-specific escape syntax, then decodes supported escape representations back to characters. It covers JavaScript \uXXXX, JavaScript \u{...}, strict JSON escapes, Python \u and \U forms, Java UTF-16 escapes, HTML numeric character references, CSS escapes and human-readable U+ notation. The page processes text locally in your browser and does not execute decoded content.

The important rule is that escape syntax belongs to a parser. A sequence valid in JavaScript may be invalid in JSON, and an HTML numeric reference is not JavaScript syntax. Use the syntax selector before decoding so malformed input is reported instead of quietly interpreted by the wrong rules.

Unicode escape formats at a glance

CharacterCode pointJavaScriptJSONPythonHTML hex
AU+0041\u0041\u0041\u0041A
éU+00E9\u00E9\u00E9\u00E9é
😀U+1F600\u{1F600}\uD83D\uDE00\U0001F600😀

How \uXXXX works

The four-digit \uXXXX form stores hexadecimal digits in source text. In JavaScript, JSON and Java contexts it represents a UTF-16 code unit, not always a full Unicode scalar value. Basic Multilingual Plane characters such as é fit in one escape: \u00E9. Values above U+FFFF need a syntax that supports full code points or a valid surrogate pair.

Supplementary characters and surrogate pairs

The emoji 😀 is code point U+1F600. JSON and Java-style UTF-16 escape syntax writes it as \uD83D\uDE00: a high surrogate followed by a low surrogate. The two escapes together decode to one code point. \uD83D by itself, \uDE00 by itself, and reversed order are malformed and should be rejected.

JavaScript, JSON, Python, Java, HTML and CSS differences

Modern JavaScript accepts code-point escapes such as \u{1F600}. Strict JSON does not; JSON uses \uXXXX and surrogate pairs for supplementary characters. Python uses \uXXXX for BMP values and \UXXXXXXXX for long escapes. Java strings use UTF-16 escapes. HTML uses numeric character references such as é and é. CSS uses a backslash followed by one to six hexadecimal digits and may need a terminating space.

Auto-detect is useful for obvious markers, but it is deliberately conservative. The input \u00E9 is shared by JavaScript, JSON, Python and Java, so the converter reports it as ambiguous. By contrast, \u{1F600} is JavaScript code-point syntax, \U0001F600 is Python-style syntax, and 😀 is an HTML hexadecimal reference. When correctness matters, choose the exact input syntax instead of relying on guessing.

Unicode escapes are not UTF-8 bytes

é
Code point: U+00E9
Escape: \u00E9
UTF-8 bytes: C3 A9

Escapes are text notation. UTF-8 bytes are an encoded storage or transport representation. Do not turn the UTF-8 bytes C3 A9 into \uC3A9 or HTML references é when you mean é.

Literal vs interpreted escapes

The text \u00E9 can be an escape sequence for é, or it can be six literal characters: backslash, u, zero, zero, E, nine. The text \\u00E9 usually decodes one layer to the literal string \u00E9. This tool reports a remaining-layer notice instead of automatically decoding repeatedly.

Separators are also syntax-sensitive. Continuous source-code strings normally use no separator, while Unicode notation is often easier to read with spaces or new lines. The All representations option produces one structured row per code point so you can compare JavaScript, JSON, Python, Java, HTML, CSS, UTF-8 bytes and UTF-16 code units without mixing those formats into one ambiguous output string.

Avoid double escaping

Double escaping happens when already escaped text is escaped again, such as \u00E9 becoming \\u00E9. That may be correct when a string is nested inside another string, but it is often a pipeline bug. Decode one layer at a time and stop when the application contract says the value is ordinary text.

How to use the tool

  1. Choose Encode or Decode.
  2. For Encode, select the output syntax and character handling.
  3. Choose hexadecimal casing and a separator only when that syntax benefits from separated values.
  4. For Decode, select the input syntax or Auto-detect.
  5. Use Advanced options only when normalization is intentional.
  6. Review warnings, statistics and decoded output before copying, downloading or using output as the next input.

Use Escape non-ASCII characters when you want readable ASCII text with non-ASCII characters represented numerically. Use Escape all characters when every code point must be visible as notation. Preserve printable ASCII keeps ordinary ASCII letters and punctuation readable while still escaping controls and non-ASCII characters.

Privacy and processing

This tool runs in your browser. Your input is not submitted to UnicodeNow. Output is written as textarea text, not inserted as executable markup or code.

Common uses

Frequently asked questions

What is a Unicode escape sequence?

A source or data notation representing a Unicode value with numeric syntax.

What does \u0041 mean?

It commonly represents U+0041, LATIN CAPITAL LETTER A.

What is the difference between U+0041 and \u0041?

U+0041 is Unicode notation; \u0041 is parser syntax used by several languages and formats.

Why does emoji sometimes need two \uXXXX escapes?

Because UTF-16 represents supplementary code points with surrogate pairs.

Is \u{1F600} valid JSON?

No. It is JavaScript syntax, not strict JSON.

What does \U0001F600 mean?

Python-style notation for U+1F600.

Are HTML numeric references Unicode escapes?

They serve a similar purpose but are HTML character-reference syntax.

Are Unicode escapes UTF-8 bytes?

No. Escapes are text syntax; UTF-8 is an encoded byte sequence.

Can this tool decode multiple syntax families?

Yes, when the input syntax is selected or reliably detected.

What is double escaping?

An additional escaping layer has been added to already escaped text.

Does decoding normalize Unicode?

No, unless normalization is explicitly enabled.

Is my text uploaded?

No. This tool runs in your browser and does not submit input to UnicodeNow.

Related tools

PHP Escape and Unescape

Escape and unescape PHP-style single and double quoted strings.

DeveloperProcessed locally

XML Escape and Unescape

Escape and decode XML entities and numeric character references.

DeveloperProcessed locally

Unicode Character Inspector

Inspect each Unicode character, encoding, category, script and normalization form.

UnicodeProcessed locally

Byte Length Calculator

Count UTF-8 bytes, code points, grapheme clusters and UTF-16 code units for text.

EncodingProcessed locally

Unicode Sequence Analyzer

Analyze code points, grapheme clusters, bytes, scripts and directionality.

UnicodeProcessed locally

Related guides

Unicode vs UTF-8

Unicode defines characters and code points. UTF-8 encodes those code points as bytes for files, databases, web pages, APIs and network messages.

What Is a Unicode Code Point?

Learn what Unicode code points are, how U+ notation works, and how code points differ from glyphs, bytes, code units and visible characters.

Unicode Normalization Explained

Learn NFC, NFD, NFKC and NFKD, canonical and compatibility equivalence, and safe normalization for comparison, search and identifiers.