HTML 实体编解码
UpBox优盒工具箱,免费 HTML 实体编解码工具,特殊字符与实体互转,支持非 ASCII 与全字符编码,本地处理不上传。
无需注册 · 数据不上传No sign-up · nothing uploaded
原始内容Input
转换结果Result
字符数0
行数0
粘贴内容后自动转换
本工具所有运算在本地浏览器完成,你的文件、文本不会上传到服务器
工具介绍
HTML 实体编解码把 `<`、`&`、引号等会被浏览器当作标签或语法的字符,转成 `<`、`&` 这类安全写法;反向则把实体还原成可读文本。 HTML entity encoding turns characters the browser treats as markup — `<`, `&`, quotes — into safe forms such as `<` and `&`, and decodes them back to readable text.
除了五个基础字符,还能把中文、符号等非 ASCII 字符转成数字实体,适合放进只接受 ASCII 的老旧系统或邮件模板。 Beyond the five basic characters, non-ASCII text can be turned into numeric entities for legacy ASCII-only systems and email templates.
- 双向转换Both directions
- 三种编码范围Three encoding scopes
- 命名与数字实体解码Named and numeric decoding
- 复制与下载Copy and download
- 本地处理不上传Runs locally
使用说明
- 在左栏粘贴要处理的文本或含实体的内容。Paste text or entity-laden content on the left.
- 选择“字符 → 实体”或“实体 → 字符”。Choose text-to-entity or entity-to-text.
- 编码时再选范围:基础字符、非 ASCII 或全部字符。For encoding, pick the scope: basic, non-ASCII or everything.
- 结果自动生成,可复制或下载为 txt。The result appears automatically and can be copied or downloaded as txt.
常见问题
为什么中文也要转?Why encode Chinese characters?
非 ASCII 选项会把中文转成 `也` 形式的数字实体,用于只接受 ASCII 的系统;现代网页保留中文即可。The non-ASCII option turns Chinese into numeric entities like `也` for ASCII-only systems. Modern pages can keep the characters as-is.
支持哪些命名实体?Which named entities are supported?
常见符号如 ` `、`©`、`—`、`€`、`×` 等;生僻命名实体保持原样。Common ones such as ` `, `©`, `—`, `€` and `×`. Rare names are left untouched.
能还原十六进制实体吗?Are hex entities decoded?
可以,`😀` 与 `😀` 都会被还原成对应字符。Yes — both `😀` and `😀` decode to the matching character.
处理会改变原有排版吗?Does conversion change layout?
不会。这里只做字符与实体替换,不处理换行、缩进或标签结构。No. It only swaps characters for entities; line breaks, indentation and markup stay as they are.