HTML Entity Encoder / Decoder

Encode text to HTML entities or decode entities back to text.

Related Tools

0 comments

How it works

Encoding replaces characters that have special meaning in HTML — such as <, >, &, and quotes — with their entity equivalents (&lt;, &gt;, &amp;, &quot;) so they display as literal text instead of being parsed as markup. Decoding reverses this, turning named and numeric entities back into characters. This prevents broken layouts and cross-site scripting when showing user content. Everything runs locally in your browser, so it is safe for private snippets.


              < → &lt;   & → &amp;   " → &quot;
            

Common use cases

  • Escaping a code snippet so angle brackets show up in an HTML page.
  • Decoding entity-laden text copied from an email or CMS.
  • Sanitizing user input before inserting it into a template.

Frequently asked questions

Which characters get encoded?

The HTML-significant ones — &, <, >, double and single quotes — are always escaped. Optionally all non-ASCII characters can be converted to numeric entities for maximum compatibility.

Does it handle numeric entities?

Yes. Decoding understands both named entities like &copy; and numeric ones like &#169; or &#xA9;, converting them back to the original character.

Is my text uploaded?

No. Encoding and decoding run entirely in your browser, so nothing you paste leaves your device.