Unicode Escape/Unescape
Convert Unicode characters to \uXXXX escape sequences and back. Free online Unicode escape unescape tool with surrogate pair support.
Output will appear here...
What is Unicode Escape/Unescape?
Unicode escape sequences represent characters using the \uXXXX format, where XXXX is the character's code point in hexadecimal. For example, the Chinese character 'δΈ' becomes \u4E16. This format is used in JSON, JavaScript strings, Java properties files, and many configuration formats to safely encode non-ASCII characters.
How to Use
- Select Escape or Unescape mode using the toggle buttons
- In Escape mode: type text with Unicode characters to see \uXXXX sequences
- In Unescape mode: paste \uXXXX sequences to see the decoded characters
- Use Swap to reverse the direction
Examples
Escape Unicode text
Unescape sequences
Related Tools
URL Encoder/Decoder
Encode or decode URL components instantly. Free online URL encoder and decoder for special characters.
HTML Entity Encoder/Decoder
Encode or decode HTML entities instantly. Free online HTML entity encoder for special characters.
Base64 Encode & Decode
Encode text to Base64 or decode Base64 to text. Free online Base64 encoder and decoder with instant conversion.
JSON String Escape/Unescape
Escape and unescape strings for JSON. Handle newlines, quotes, backslashes, and tabs. Free online JSON string escape tool.
Frequently Asked Questions
What is the difference between \uXXXX and \u{XXXXX}?
\uXXXX is the standard 4-digit format (BMP, code points 0-65535). \u{XXXXX} is ES6 syntax that supports any code point including those above 65535 (like emojis). This tool supports both formats for unescaping and uses \u{XXXXX} for surrogate pairs when escaping.
Why do some characters produce two escape sequences?
Characters outside the Basic Multilingual Plane (code points above 65535, like many emojis) are represented as surrogate pairs in UTF-16. For example, π (U+1F600) uses two 4-digit escapes: \uD83D\uDE00. The tool also supports ES6 \u{1F600} syntax.
Where are Unicode escape sequences used?
JSON strings, JavaScript source code, Java .properties files, Python string literals, CSS content properties, and many configuration file formats. They allow files to remain ASCII-only while representing any Unicode character.