首页
Tom Utilities

HTML 转义 / 反转义

HTML、CSS 与 JavaScript

将文本转义以安全输出 HTML,或将 HTML 实体解码为可读字符。

输入

结果

使用方法

Escaping HTML entities

Press Encode to escape angle brackets and ampersands, or Decode to turn entities back into characters.

  1. Paste text or markup.
  2. Press Encode or Decode.
  3. Copy the converted result.

常见问题

Can escaping protect against XSS?

Escaping is one layer of defence. Always escape output on the server as well.

Are numeric entities supported?

Yes, decode understands named, decimal and hexadecimal entities.