首页 Home/Unicode 编码转换 / Unicode Encoder / Decoder

Unicode 编码转换 · Unicode Encoder / Decoder

Unicode 为世界上每个字符分配唯一编号(码点)。常见表示方式包括 JavaScript 风格的 \uXXXX、ES6 的 \u{1F600} 花括号形式,以及 HTML 实体 中 和 中。

Unicode assigns a unique number (code point) to every character. Common representations include JavaScript-style \uXXXX, ES6 brace form \u{1F600}, and HTML entities 中 and 中.

Unicode 编码转换Unicode Encoder / Decoder
INPUT0 chars
OUTPUT
结果会显示在这里
提示:所有处理都在你的浏览器本地完成。输入后自动更新结果

Unicode 编码转换 / Unicode Encoder / Decoder

功能介绍(中文)

Unicode 为世界上每个字符分配唯一编号(码点)。常见表示方式包括 JavaScript 风格的 \uXXXX、ES6 的 \u{1F600} 花括号形式,以及 HTML 实体 中 和 中。

本工具支持把文本转义为以上四种格式,也能自动识别并还原它们,包括一段文本里混用多种格式的情况。辅助平面的表情字符会正确处理:既能输出代理对 \ud83d\ude00,也能输出码点形式 \u{1F600},并能互相还原。

此外还可以直接输入十六进制码点(如 4e2d 6587 或 0x4e2d,0x6587)快速得到对应文字。

Overview (English)

Unicode assigns a unique number (code point) to every character. Common representations include JavaScript-style \uXXXX, ES6 brace form \u{1F600}, and HTML entities 中 and 中.

This tool escapes text into all four formats and automatically detects and restores them, even when several formats are mixed in one text. Supplementary-plane emoji are handled correctly, output as either surrogate pairs \ud83d\ude00 or code point form \u{1F600}, both reversible.

You can also type hexadecimal code points directly, such as 4e2d 6587 or 0x4e2d,0x6587, to get the corresponding characters.

功能特点(中文)

  • 四种输出格式:\uXXXX、\u{...}、&#x...;、&#...;
  • 还原方向自动识别并支持混合格式
  • 表情符号的代理对与码点形式都能处理
  • 十六进制码点可直接转文本

Features (English)

  • Four output formats: \uXXXX, \u{...}, &#x...;, &#...;
  • Auto-detect and restore mixed escape formats
  • Handles both surrogate pairs and code point form for emoji
  • Direct hex code point to text conversion

常见问题 / FAQ

Unicode 和 UTF-8 有什么区别?

Unicode 是字符集,为每个字符分配码点;UTF-8 是一种编码方式,规定如何把码点转换成字节序列。简单说,Unicode 定义“是什么字符”,UTF-8 定义“怎么存储传输”。

What is the difference between Unicode and UTF-8?

Unicode is a character set that assigns code points to characters; UTF-8 is an encoding that maps those code points to bytes. Unicode defines which character it is, UTF-8 defines how to store and transmit it.

为什么表情符号是 \ud83d\ude00 两个转义?

JavaScript 字符串内部使用 UTF-16,超出基本平面的字符需要用两个 16 位单元(代理对)表示。😀 的码点是 U+1F600,对应的代理对就是 \ud83d\ude00。工具也能输出更直观的 \u{1F600} 形式。

Why is an emoji two escapes like \ud83d\ude00?

JavaScript strings use UTF-16, so characters beyond the basic multilingual plane need two 16-bit units (a surrogate pair). 😀 is U+1F600, encoded as \ud83d\ude00. The tool can also output the clearer \u{1F600} form.

← 返回全部工具 / All tools

已复制到剪贴板