Escape Unicode
Convert Unicode characters to escape sequences. Supports JavaScript \\uXXXX, Python \\uXXXX, CSS \\XXXX, and HTML XXXX; formats.
Paste text with emoji, accented letters, or symbols outside ASCII and get back clean escape sequences in JavaScript, ES6, CSS, or HTML notation. Useful when you're hardcoding strings into source files and want to dodge encoding bugs that show up only in production. And everything runs in your browser. Nothing gets uploaded.
How to Use
Enter text containing Unicode characters in the left panel.
Choose format — JS \\uXXXX, ES6 \\u{XXXX}, CSS \\XXXX, or HTML entities.
Toggle "Keep ASCII" to leave printable ASCII characters as-is or escape everything.
Copy or download the escaped output.
Frequently Asked Questions
What is Unicode escaping?
Unicode escaping replaces characters with their code point representation in a specific notation. For example, the character "A" (U+0041) can be escaped as \\u0041 in JavaScript, \\0041 in CSS, or A in HTML. This is useful when working with characters that can't be typed directly or may cause encoding issues.
What is the difference between JS and ES6 format?
Traditional JavaScript uses \\uXXXX which only supports characters in the Basic Multilingual Plane (up to U+FFFF). Characters above that require surrogate pairs. ES6 introduced \\u{XXXXX} syntax which can represent any code point directly, including emoji and supplementary characters.
When should I use CSS Unicode escapes?
CSS Unicode escapes (\\XXXX) are used in CSS source code to represent characters in selectors, property values, and content. For example, content: "\\2665" inserts a heart symbol. The escape is followed by a space if the next character could be confused as part of the hex value.
What does "Keep ASCII" do?
When enabled, printable ASCII characters (codes 32-126) are left as-is in the output. Only non-ASCII characters are escaped. When disabled, every character is escaped, including basic Latin letters and digits.
Is my data safe?
Yes. All processing happens in your browser using JavaScript. No data is sent to any server.