HTML Entity Encoder & Decoder

Encode HTML special characters or decode named and numeric entities into plain text.

Processed locally in your browser. Your input is not uploaded.

How to use HTML Entity Encoder & Decoder

Encode ampersands, angle brackets, double quotes and apostrophes. Decode semicolon-terminated named entities supported by your browser and decimal or hexadecimal numeric references.

Details and limits

Decoded markup remains plain text and is never inserted as live page content. Unknown entities are preserved. Decoding performs one pass; double-encoded text can be decoded again if needed. Input is limited to 200,000 characters.

Practical example

Encoding helps represent reserved characters as text in HTML. Decoding runs once, so double-encoded text may need another pass.

Encode <b>Hi</b> to get &lt;b&gt;Hi&lt;/b&gt;. Decoding the encoded version returns the literal tags as text, not a bold element.

Frequently asked questions

Will encoding already escaped text add another layer?

Yes. Encoding &amp; encodes its ampersand again, producing &amp;amp;. Start with unescaped source text if you want one layer.

Does entity encoding remove scripts from a document?

No, this is a text transformation, not an HTML sanitizer. Its output must still be handled appropriately by the application where you use it.

Why does encoding leave accented letters readable?

The encoder targets HTML-sensitive punctuation, not every Unicode character. Accented letters can remain literal in UTF-8 HTML.