HTML Entity Encoder / Decoder

Encode text to HTML entities, or decode HTML entities back to text. Runs entirely in your browser.

About this tool

Encoding escapes the characters that are meaningful in HTML (& < > " ') as named entities, so text can be safely embedded in a page without being interpreted as markup. Decoding uses the browser's own HTML parser, so it correctly handles the full range of named and numeric entities (e.g. &amp;, &#233;).

Share on LinkedInShare on X
Link to this tool

Copy this HTML to cite this tool from your own site or article.

About HTML Entity Encoder / Decoder

HTML Entity Encoder / Decoder converts special characters into named or numeric HTML entities and decodes entities back to plain text.

How to use HTML Entity Encoder / Decoder

  1. Paste text or HTML content into editor field.
  2. Choose operation mode: Encode to Entities or Decode Entities.
  3. Select named entities (e.g. &amp;) or decimal/hex entities.
  4. Click Process and copy output text.

Examples

Input: <script>alert("test")</script> Encoded Output: &lt;script&gt;alert(&quot;test&quot;)&lt;/script&gt;

FAQ

What is the difference between named entities and numeric entities?

Named entities use readable names (like &copy;), while numeric entities use character codes (like &#169;). Both render identically in web browsers.

Does entity decoding handle quotes and ampersands?

Yes. Special characters like &quot;, &apos;, and &amp; decode accurately.