HTML Entity Encoder & Decoder

Turn text containing < > & and quotes into entities that show correctly inside HTML, or turn entities back into plain text. Everything runs in your browser; nothing you enter is uploaded or stored.

  • Free, no sign-up
  • Runs in your browser
  • Verified

How to use it

  1. Choose encode or decode.
  2. Paste your text.
  3. Copy the result.

How it works

Encoding replaces & < > " and ' with &amp; &lt; &gt; &quot; and &#39;, and optionally every non-ASCII character with a numeric entity like &#233;. Decoding understands numeric entities (&#65; and &#x41;) and a list of common named entities such as &copy; and &nbsp;; names it does not know are left as they are.

Examples

  • <b>Tom & Jerry</b> becomes &lt;b&gt;Tom &amp; Jerry&lt;/b&gt;.

Limitations

  • Escaping text for display is not a complete defence against cross-site scripting; use your framework’s context-aware escaping.
  • Only common named entities are decoded.

References

Last verified . See our Accuracy & Editorial Policy. Found a problem? Email contact@tools.gift.