Code point, bytes and category of every character, hidden ones flagged
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.
Loading toolβ¦
How to use unicode escape converter
Choose Text to escapes or Escapes to text.
Pick the format: JavaScript and JSON, ES2015, Python and C, CSS, HTML hex or decimal, or U+ code points.
Keep only non-ASCII escaped, or escape everything.
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.
Related tools
Escape text as HTML entities or decode named and numeric ones
Characters to decimal codes and codes back to text
Percent-encode text for query strings, full URLs or form data