🈶Unicode Converter - Text to \u Escape, UTF-8 Hex & Code Points
Code, logs and JSON are full of sequences like \u4f60\u597d, 你 or E4 BD A0. This tool turns any text into JavaScript/Java \uXXXX escapes, ES6 \u{…}, HTML numeric entities, UTF-8 hex bytes, URL percent-encoding or a U+ code point list, and decodes the other way by auto-detecting whatever formats are mixed into the input. Characters beyond the BMP, such as emoji, are handled correctly as surrogate pairs or full code points. A details table lists each character's code point, decimal value, UTF-8 and UTF-16 units, which is handy for debugging mojibake.
Free · No sign-up · Runs in your browserLast updated:
Loading tool...
How to use Unicode Converter
- 1Choose Text → Escapes or Escapes → Text
- 2When encoding, pick the format (\uXXXX, &#x…;, UTF-8 …) and optionally convert only non-ASCII characters
- 3Read the result and the per-character table, and copy
FAQ
- Why does one emoji become two \u escapes?
- JavaScript, Java and JSON strings are UTF-16, so characters above U+FFFF (like 😀) need two surrogate units, written \ud83d\ude00. If your target supports ES6, choose the \u{1f600} format to write the full code point.
- Do I need to tell it which format to decode?
- No. It recognizes \uXXXX, \u{…}, HTML entities, U+ code points, \xHH / %XX byte runs and space-separated hex bytes automatically, leaves normal text untouched, and handles mixed formats together.
- What is the difference between Unicode and UTF-8?
- Unicode assigns every character a code point ("你" is U+4F60); UTF-8 is one way of storing code points as bytes, where "你" takes three bytes E4 BD A0. The details table shows code point, UTF-8 and UTF-16 side by side.
- Is my data uploaded?
- No. Everything runs locally in your browser with no network upload and is discarded when you close the page, so it is safe for internal or sensitive data.