TuttiTools
&;

HTML Entity Encoder / Decoder

Encode and decode HTML entities

What are HTML Entities?

HTML uses certain characters as part of its syntax β€” angle brackets (< and >), ampersands (&), and quotes are all special in HTML. If you want these characters to appear as visible text on a web page rather than being interpreted as HTML code, they need to be encoded as HTML entities.

For example, < becomes &lt;, > becomes &gt;, and & becomes &amp;. There are also entities for characters that aren’t on a standard keyboard, like copyright symbols (&copy;), em dashes (&mdash;), and non-breaking spaces (&nbsp;).

What Does This Tool Do?

This tool encodes text into HTML entities (replacing special characters with their entity equivalents) and decodes HTML entities back to plain text. It handles both named entities and numeric character references.

How to Use This Tool

  1. Choose Encode or Decode mode.
  2. Paste or type your text in the input area.
  3. The result appears immediately.
  4. Use the copy button to grab the output.

Common Use Cases

Frequently Asked Questions

What's the difference between named and numeric entities?

Named entities like &lt; are human-readable. Numeric entities like &#60; or &#x3C; (hex) represent the same character by its Unicode code point. Both are valid HTML.

Does this protect against XSS attacks?

Encoding user input as HTML entities is an important step in preventing XSS. However, proper security requires a complete approach β€” use server-side sanitization libraries, not just this tool.

Is my data private?

Yes. All encoding and decoding runs locally in your browser.

Related Tools