← Back to all tools

Simple & private

HTML Entity Encoder

Encode or decode special HTML characters.

What is this tool?

Characters like < and & have special meaning in HTML. This tool encodes them into safe entities so they display correctly, or decodes entities back into plain, readable text.

How to use this tool

  1. Paste your text or HTML-encoded string into the input box.
  2. Choose "Encode HTML" or "Decode HTML".
  3. Click "Run tool" to see the result.

Example

Encoding "<b>Hi & bye</b>" produces "&lt;b&gt;Hi &amp; bye&lt;/b&gt;", which displays safely inside a web page.

Common use cases

Frequently asked questions

Why do I need to encode these characters? +

Raw characters like < and & can break a page's layout or accidentally create an unintended HTML tag.

Does decoding always reverse encoding exactly? +

Yes, decoding returns the original characters as long as the entities were standard HTML entities.

Can I use this for XML as well as HTML? +

The core entities like &lt; and &amp; are shared with XML, so it generally works for both.