Unicode Converter
Free online Unicode converter. Encode text to Unicode escape sequences or decode \uXXXX back to readable text. Works with emoji, Chinese, and all Unicode characters.
How to Use Unicode Converter
Enter Your Text
Type or paste text into the input panel. You can enter regular text to encode, or Unicode escape sequences to decode.
Choose Direction
Click "Encode" to convert text to Unicode escape sequences (\uXXXX format), or "Decode" to convert escape sequences back to readable text.
Copy the Result
The output appears on the right. Copy it and use it in your JavaScript, JSON, or CSS code.
Examples
Plain Text
Hello 世界 🌍 Unicode Escapes
Hello 世界 🌍 Frequently Asked Questions
What are Unicode escape sequences?
Unicode escape sequences represent characters using the \u prefix followed by a 4-digit hex code. For example, the Chinese character 中 becomes \u4e2d. Characters outside the Basic Multilingual Plane (like emoji) use surrogate pairs: \uD83D\uDE00 for 😀.
When do I need Unicode escaping?
Unicode escaping is useful when: writing JavaScript/JSON strings that contain non-ASCII characters, debugging encoding issues, working with legacy systems that only support ASCII, and creating CSS content properties with special characters. It's also helpful for understanding what character a particular code point represents.
What's the difference between \uXXXX and \u{XXXXX}?
The \uXXXX format (4 hex digits) is the classic JavaScript/JSON escape for BMP characters. The \u{XXXXX} format (with braces) is ES6+ syntax that supports all Unicode code points directly. This tool uses the \uXXXX format with surrogate pairs for characters above U+FFFF.
Understanding Unicode Escaping
Unicode is the universal character encoding standard that covers virtually every writing system. When you need to represent non-ASCII characters in ASCII-only environments (like JSON, JavaScript source code, or CSS), you use Unicode escape sequences. Each escape takes the form \\uXXXX where XXXX is the hexadecimal code point.
Common Use Cases
- Writing internationalized JavaScript/JSON that stays ASCII-safe
- Debugging character encoding issues in APIs and databases
- Understanding what a mysterious \uXXXX sequence represents
- Creating CSS content with special characters
- Working with regex patterns that match Unicode ranges