HTML Entity Encoder & Decoder

Encode special characters to HTML entities or decode entities back to text. Free online HTML entity converter for safe HTML — runs in your browser.

About HTML Entity Encoder & Decoder

Characters like <, >, & and quotes have special meaning in HTML, so showing them as text, putting code samples on a page or inserting user content safely means converting them to HTML entities such as &lt; and &amp;. DrToolLab's HTML entity encoder converts any text into safe HTML entities, and the decoder turns entity-filled text back into readable characters. This is useful when writing blog posts that show code, pasting product descriptions into marketplaces or email templates that break on special characters, debugging text that shows up as &amp;quot; on a page, and cleaning data exported from CMS systems. Paste your text, choose encode or decode, and copy the result. Everything runs in your browser, so the content you convert is never uploaded or stored, and there is no limit on length.

How to use HTML Entity Encoder

  1. 1

    Paste or type your text into the input box (a sample loads so you can try it straight away).

  2. 2

    Choose any HTML Entity Encoder options you need.

  3. 3

    Copy the output or download it as a file.

Private by design. Everything runs in your browser. The text you enter is never sent to a server or stored.

Frequently Asked Questions

What are HTML entities?

Codes such as &lt; and &amp; that represent characters which would otherwise be read as HTML, so they display as plain text.

Why does my text show &amp;quot; or &amp;amp;?

It was encoded twice or not decoded. Run it through the decoder to get the readable characters back.

Does encoding protect against XSS?

Encoding user content before inserting it into HTML is an important part of preventing XSS, but your application should also use its framework's built-in escaping.

Is there a size limit?

No fixed limit — it handles long documents, processed in your browser.

Related Tools