HTML Entity Encode / Decode

Convert special characters to HTML entities and back.

Tool

Was this tool useful?

About this tool

About HTML Entity Encode / Decode

Show code samples safely in a web page or turn entities back into normal text.

How it works

Encode converts & < > " ' to &amp; &lt; &gt; &quot; &#39;. An option also converts all non-ASCII characters to numeric entities.

Example

<b>Hi</b> → &lt;b&gt;Hi&lt;/b&gt;

How to use this tool

  1. Paste text or HTML.
  2. Click Encode or Decode.
  3. Copy the result.

Frequently asked questions

Does decoding run scripts?

No. Decoding only reads entity text and never runs code.

What are numeric entities?

Codes like &#169; for ©. They work in any character encoding.

Does the HTML Entity Encode / Decode send my data to a server?

No. The HTML Entity Encode / Decode runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.