Developer Tools
Unicode Escape Converter
Convert text to \u00E9, \u{1F600}, U+00E9, é, CSS or UTF-8 byte escapes, or decode them back to text, with a code point, UTF-8 and UTF-16 table.
How to use Unicode Escape Converter
Type text to encode it, or paste escapes to decode them; the direction is detected automatically. Choose the output format for your language, and a table lists each character's code point, UTF-8 bytes and UTF-16 units.
- Enter text or escapesType text such as Café, or paste sequences such as \u00E9, \u{1F600}, U+00E9, é or é.
- Choose a formatPick U+ code points, \u for JavaScript and JSON, \u{…} for ES6 and Rust, Python, HTML hex or decimal, CSS or UTF-8 bytes.
- Fine-tune and copyLeave ASCII as it is or escape every character, choose lower-case hex if you prefer, then copy the result.
Escape formats compared
Take Café, the hot drink symbol U+2615 and the grinning face emoji U+1F600. JavaScript, JSON and Java give Caf\u00E9 \u2615 \uD83D\uDE00, where the emoji needs a UTF-16 surrogate pair; ES6, Rust and Swift Caf\u{E9} \u{2615} \u{1F600}; Python and C Caf\u00E9 \u2615 \U0001F600; HTML Café ☕ 😀 in hex or Café ☕ 😀 in decimal; CSS \E9, \2615 and \1F600; and UTF-8 bytes Caf\xC3\xA9 \xE2\x98\x95 \xF0\x9F\x98\x80, as seen in C strings and logs. U+ mode lists every code point instead, such as U+00E9 and U+1F600.
Decoding mixed escapes
Decoding understands \uXXXX (including surrogate pairs), \u{…}, \UXXXXXXXX, runs of \xXX UTF-8 bytes, U+XXXX and HTML numeric entities, even when they are mixed in one string: Caf\u00E9 U+2615 😀 decodes to Café followed by the hot drink symbol and the grinning face emoji, and reports 3 sequences. CSS escapes are decoded when the format is set to CSS. If the result contains an unpaired surrogate, usually half of an emoji copied on its own, you get a warning. When encoding, the table under the output shows each character's code point, decimal value, UTF-8 bytes, UTF-16 units and category.
Accuracy and data handling
Validate the result with your project's own tests and runtime rules before using it in production. The calculation runs in your current browser; the tool code does not send the input to a processing API.
FAQ
Why does an emoji become two \u escapes?
JavaScript, JSON and Java strings use UTF-16, so characters above U+FFFF need a surrogate pair: the grinning face emoji U+1F600 is \uD83D\uDE00. The ES6 format writes it as a single \u{1F600}.
What is the Unicode code point of é?
é is U+00E9, or 233 in decimal. In UTF-8 it takes two bytes, C3 A9, and in HTML you can write it as é or é.
Do letters and digits need escaping?
Usually not. Leave ASCII letters, digits and punctuation as they are is ticked by default, so only other characters are escaped. Untick it to escape everything: Hi becomes \u0048\u0069.
More Developer Tools
Related toolsBulk-check email address syntax with reasons, typo hints and a clean list
Break a URL into scheme, host, port, path, parameters and fragment
Parse URL parameters into JSON, or build a query string from JSON
Escape text for use inside a JSON string, or unescape it back to plain text
Look up MIME types by extension, or extensions by MIME type
Generate Cache-Control headers and server config for browsers and CDNs