ITInfoByte

HTML Entity Encoder / Decoder

Encode text so it displays literally in HTML — & becomes &amp;amp;, < becomes &amp;lt; — or paste entity-soup and decode it back to plain text. Decoding understands the full named-entity set your browser does.

Runs locally — nothing you enter is sent Utility Free · no signup

How to use

  1. Paste the text (to encode) or the entity-encoded string (to decode).
  2. Optionally tick the box to also encode non-ASCII characters as numeric entities.
  3. Click Encode or Decode and copy the result.

Examples

Plain
Tom & Jerry <script>
Encoded
Tom &amp; Jerry &lt;script&gt;

Supported formats

  • Encoding: the five HTML-critical characters (& < > " ') always; non-ASCII optionally as &#…; numerics.
  • Decoding: all named entities the browser knows, plus decimal and hex numeric forms.

Privacy

This tool runs entirely in your browser. Nothing you enter or open is sent anywhere. Privacy policy.

Limitations

  • Encoding is for displaying text inside HTML content — attribute, URL and JavaScript contexts each have their own escaping rules beyond this.

FAQ

When do I need to escape HTML?

Whenever text a user typed (or any data) is placed into a page as content — otherwise a stray < starts a tag and you have broken layout at best, XSS at worst.

Is decoding safe here?

Yes — decoding parses the text without executing it, so entity-encoded script tags come back as inert text, never as running code.