Text to Unicode Escape Sequences
Example
Input:
café ☕
Output:
caf\u00e9 \u2615
About this converter
Escape sequences let ASCII-only formats carry any character: each character becomes \u followed by four hex digits of its code point. Characters above U+FFFF (most emoji) do not fit in four digits, so UTF-16-based languages write them as a surrogate pair — two escapes that together name one character — and this converter does the same, matching what JSON parsers and Java actually expect. You meet this format in Java .properties files, older JSON payloads from Java services, Windows registry exports and internationalization files where a build pipeline cannot be trusted with raw UTF-8.
Frequently Asked Questions
Why did one emoji become two escapes?
It lives above U+FFFF, so UTF-16 writes it as a surrogate pair: a high surrogate (D800–DBFF) plus a low surrogate (DC00–DFFF). Parsers recombine them automatically.
Is \u escaping the same as percent-encoding?
No — different worlds. \uXXXX belongs to string literals in code and JSON; %XX belongs to URLs.
Which characters are left unescaped?
Plain printable ASCII passes through untouched (except backslash and quote, which are escaped so the result stays valid inside a string).