Unicode EscapeConvert text to Unicode escape sequences (\uXXXX format).

Unicode Escape
Convert text to Unicode escape sequences (\uXXXX format).
Enter Text
Type or paste the text to convert.
View Escaped Output
Unicode escape sequences appear instantly.
Copy Result
Click Copy to copy the escape sequences.
What Is Unicode Escape?
Unicode escaping converts characters to their \uXXXX escape sequence representation, where XXXX is the 4-digit hexadecimal Unicode code point. Characters outside the Basic Multilingual Plane (above U+FFFF) use surrogate pairs. This format is used in JavaScript, JSON, Java, C#, and Python strings. ASCII characters are typically left unescaped for readability. This tool converts all non-ASCII characters to escape sequences while preserving ASCII. All processing is client-side.
Why Use Our Unicode Escape?
- Convert any text to universal \uXXXX escape sequences
- Handles surrogate pairs for emoji and supplementary characters
- 100% client-side — data never leaves your browser
- Compatible with JavaScript, JSON, Java, C#, and Python
Common Use Cases
Source Code
Embed international text in source code using escape sequences.
JSON Data
Escape non-ASCII characters in JSON strings.
Configuration
Represent Unicode in ASCII-only configuration files.
Debugging
Inspect exact code points of Unicode characters.
Technical Guide
Each character's code point is obtained via charCodeAt() and formatted as \uXXXX with zero-padded 4-digit hex. For supplementary characters (U+10000+), JavaScript uses UTF-16 surrogate pairs. Modern JavaScript also supports \u{XXXXX} syntax for code points above U+FFFF.
Tips & Best Practices
- 1ASCII characters (32-126) are preserved for readability
- 2Emoji use surrogate pairs in \uXXXX format
- 3Output is valid in JavaScript, JSON, Java, and C# strings
- 4Use \u{XXXXX} in modern JavaScript to avoid surrogate pairs
Related Tools

Unicode Unescape
Convert Unicode escape sequences (\uXXXX) back to readable text.

HTML Entity Encode
Convert special characters to HTML entities for safe web embedding.

URL Encode (Full)
Percent-encode all special characters in a URL string.

UTF-8 Encode/Decode
View UTF-8 byte representations of text and decode byte sequences.

Base64 Encode
Encode text to Base64 format instantly in your browser.

Base64 Decode
Decode Base64-encoded strings back to plain text instantly.
Frequently Asked Questions
QIs this tool free?
QIs my data secure?
QWhat are surrogate pairs?
QWhat browsers are supported?
QWhich languages support this format?
About Unicode Escape
Unicode Escape is a free online tool from FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration required. No ads. Just fast, reliable tools.







