Toolhaus

HTML Entity Encoder / Decoder

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

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.

Related tools