Skip to content
hateitall

Unicode Escape Converter

Get the right escape sequence for JavaScript, JSON, Python, CSS or HTML, or turn escaped text from a log back into real characters.

Processed locallyIn: Text, Escaped textOut: Escaped text, Text

Loading tool…

How to use unicode escape converter

  1. Choose Text to escapes or Escapes to text.

  2. Pick the format: JavaScript and JSON, ES2015, Python and C, CSS, HTML hex or decimal, or U+ code points.

  3. Keep only non-ASCII escaped, or escape everything.

  4. Copy the result; when decoding, Detect finds every format at once.

What this tool does

  • Writes emoji as surrogate pairs (πŸ˜€) for JSON and JavaScript, or as one code (\u{1F600}, \U0001F600) where the language allows.
  • Lists U+ code points for every character, joining them back into text on decode.
  • Decoding detects \u, \u{}, \U, &#x;, &#; and U+ forms in the same text.
  • Warns when the input already contains escape sequences that a round trip would change.

How the result is verified

The escaped output is unescaped again in the same format and compared with your text exactly before it is marked verified.

Frequently asked questions

Why does one emoji become two \u escapes?

JavaScript and JSON strings are UTF-16, and characters above U+FFFF are stored as two 16-bit halves called a surrogate pair. πŸ˜€ is how JSON writes U+1F600.

What does U+ mean?

U+ followed by hex is the standard way to name a Unicode code point. U+0041 is A, U+00E9 is Γ©, U+1F600 is the grinning face.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Code point, bytes and category of every character, hidden ones flagged

Text→ ReportLight on device

Characters to decimal codes and codes back to text

Text · Decimal numbers→ Decimal codesLight on device

Percent-encode text for query strings, full URLs or form data

Text · URL→ Percent-encoded textLight on device