HTML Entity Encoder

Encode text to HTML entities to display it safely, or decode entities back. Runs entirely in your browser.

HTML-escaped

Processed on your device. This file is never uploaded.

  1. 1Choose Encode or Decode.
  2. 2Paste your text or entities.
  3. 3Copy the converted result.

Showing markup as text

To display a snippet of HTML on a web page — a tag, an attribute, an example — the special characters have to be escaped, or the browser renders them instead of showing them. Encoding turns<div> into &lt;div&gt;, which appears on the page as the literal text you meant.

Both directions, safely

Decoding reverses it, turning entities back into their characters — useful for reading escaped content pulled from a feed or an export. The decoder treats everything as inert text, so nothing in the input can run, and the whole conversion stays on your device.

Frequently asked questions