Quickly convert Chinese characters, symbols, and emojis to \uXXXX format, runs entirely in browser, no upload required.
Convert characters to \uXXXX (4-digit hexadecimal) or \u{XXXXXX} format, facilitating secure storage and transmission in code, configuration files, and databases.
// Encode
function toUnicode(str) {
return str.split('').map(c => '\\u' + c.charCodeAt(0).toString(16).padStart(4,'0')).join('');
}
All computations are performed in the browser, zero upload, zero data collection.
Unicode is a character set that defines a unique number (code point) for each character. UTF-8 is an implementation of Unicode, a variable-length encoding scheme. For example, the Unicode code point for the Chinese character "中" is U+4E2D, and its UTF-8 encoding is E4 B8 AD.
This tool supports standard Unicode format (\uXXXX), HTML entity encoding (XXXX;), and U+XXXX format. It also supports batch conversion of mixed formats.