Home / Developer Tools / Web Encoding & Escaping / HTML Entities Encoder & Decoder

HTML Entities Encoder & Decoder

Processed in your browser

Convert text characters to and from HTML named, decimal, and hexadecimal entities.

Result

Helpful Examples

Escape Script Tag

Convert <script> to entities

<script>alert("XSS")</script>

How to Use the HTML Entities Encoder & Decoder

Encode special characters into safe HTML entities (&amp;, &lt;, &gt;, &quot;, &#39;) to prevent markup collisions and XSS, or decode HTML entities back into plain Unicode text.

Privacy & Data Processing Notice

No user data leaves your browser. Computation is executed entirely on your device. We do not store, view, or transmit your inputs over our network. Your computation remains on your personal machine.

Frequently Asked Questions

Why encode HTML entities?
Encoding special characters ensures that browsers treat them as literal text instead of executing them as HTML markup.
Which characters are encoded by default?
&, <, >, ", and ' are encoded into &amp;, &lt;, &gt;, &quot;, and &#39;.

Related Utilities

Frequently paired browser tools in Developer Tools

Explore all Developer Tools tools ➔