loot.tools

HTML Entity Encoder/Decoder

Escape text for safe use in HTML, or decode HTML entities back to plain text. Minimal mode escapes only the reserved markup characters (& < > " '), and a second mode escapes every non-ASCII character too. Decoding handles named, decimal, and hex entities.

Encode text to HTML entities or decode entities back to text. Editing either side updates the other automatically.

Escapes only & < > " ' - keeps the rest readable.
Plain text
Entities

What are HTML entities?

HTML entities are codes that stand in for characters which would otherwise be interpreted as markup or can't be typed reliably. A few are reserved: & becomes &amp;, < becomes &lt;, > becomes &gt;, double quote becomes &quot;, and the apostrophe becomes &#39;. Others give you characters that are awkward to enter directly, like &copy; for ©, &mdash; for an em dash, or &nbsp; for a non-breaking space. Entities come in named form (&copy;), decimal numeric form (&#169;), and hex numeric form (&#xA9;).

How to use this tool

Type or paste plain text on the left to escape it into entities, or paste entity-encoded text on the right to decode it back. Both sides update as you type. Pick Minimal mode to escape only the five reserved markup characters (best for dropping user text into a page), or All non-ASCII mode to also convert every accented letter, symbol, and emoji into an entity so the output is pure ASCII.

When you'd use HTML entities

Displaying code samples on a page without the browser running them. Showing literal < and > characters in text. Preventing markup injection when you echo user input. Keeping output ASCII-only for systems that mangle non-ASCII bytes. Decoding entity-laden HTML you scraped or copied so you can read it as normal text.