Tool Hub

HTML 實體編碼器

特殊字元與 HTML 實體 (<, >, &) 互轉

將特殊字元編碼為 HTML 實體,或將實體解碼回純文字。處理命名實體和數字形式(&#x..;和&#..;)。貼上您的標記,切換編碼或解碼,並複製結果 — 全部在瀏覽器中完成。

輸出

使用方法

  1. Select Encode or Decode mode using the segmented control。
  2. In Encode mode, optionally toggle "Also encode non-ASCII characters" to convert characters like é to &#xE9;。
  3. Paste or type your text into the input field。
  4. Copy the result from the output field — all processing runs in your browser。

範例

  • Encoding "<div>A & B</div>" produces &lt;div&gt;A &amp; B&lt;/div&gt;。
  • Decoding "caf&#x00E9;" produces "café"; decoding "&lt;script&gt;" produces "<script>"。

生產環境使用前請驗證輸出。無擔保 — 參見 條款.