HTML Entity Encoder / Decoder

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

100% client-side Instant results Free forever Nothing uploaded

About the HTML Entity Encoder / Decoder

Convert special characters to HTML entities (< → &lt;) or decode entities back to plain characters. Essential for displaying code samples on web pages and preventing markup injection.

Handles named entities, numeric references and all Unicode characters.

How to use the HTML Entity Encoder / Decoder

  1. Paste your text or HTML.
  2. Click "Encode" to escape special characters, or "Decode" to reverse.
  3. Copy the result.

Common uses

Displaying code snippets on web pages Sanitizing user text for HTML output Decoding scraped or exported content

Frequently asked questions

Which characters must be escaped in HTML?
At minimum & < and >; also quotes inside attribute values (&quot;, &#39;).
What is the difference between named and numeric entities?
Named entities use mnemonics (&amp;), numeric use code points (&#38;) — both render identically.

Related tools