Toolhaus

HTML Entity Encoder / Decoder

Escape and unescape HTML entities like &, < and >.

Convert reserved HTML characters to their entity form so they display as text instead of markup, and decode entities (named, decimal é or hex é) back to characters. Optionally encode every non-ASCII character as a numeric entity. All processing stays in your browser.

Output
—

Formula & methodology

Encoding replaces &, <, >, " and ' with their named entities; the optional mode also turns characters above U+007F into &#NNN;. Decoding resolves named, decimal and hexadecimal references.

Worked example

  • <b>Tom & "Jo"</b> → &lt;b&gt;Tom &amp; &quot;Jo&quot;&lt;/b&gt;
  • &#233; &copy; → é ©

Frequently asked questions

Why escape HTML?

Escaping prevents characters like < and & from being interpreted as tags or entities, which also helps avoid broken markup and injection when showing user text.

Does it decode hex entities?

Yes. It resolves named entities, decimal references like &#233; and hex references like &#xe9;.

Privacy

All processing happens locally in your browser. Your data is never uploaded.

Read the practical guide for this category.

Related tools