Unicode Encode & Decode
How Unicode Encoding Works
Each character is converted to its Unicode code point in hexadecimal format.
- 1
Get code point
Each character's Unicode code point value is retrieved.
- 2
Format as escape sequence
The code point is formatted as \uXXXX (4-digit) or \u{XXXXX} for supplementary characters.
FAQ
What is Unicode escape encoding?
Unicode escape encoding represents each character as a backslash-u followed by its hexadecimal code point (e.g., \u0041 for "A"). Characters beyond the BMP use the \u{XXXXX} syntax.
What is the difference between \uXXXX and \u{XXXXX}?
\uXXXX uses exactly 4 hex digits and can only represent code points up to U+FFFF (BMP). \u{XXXXX} is the ES6 syntax that supports any code point, including those beyond the BMP like emoji.
Related Tools
π¦
UTF-8 Encode & Decode
Convert text to UTF-8 byte representation (hex) or decode UTF-8 bytes back to text.
π’Hex Encode & Decode
Convert text to hexadecimal representation or decode hex back to text.
π€Base64 Encode & Decode
Encode text to Base64 or decode Base64 back to text. Supports UTF-8, URL-safe variant, and batch processing.