Advertisement

HTML Entity Encoder & Decoder

Escape or unescape special HTML characters in one click.

Advertisement

How to Use This Tool

  • Encode — converts < > & " ' into safe entities. Perfect before inserting user input into HTML.
  • Decode — turns entities like &lt; back into their literal characters.
  • Copy the result straight to your code or template.

Frequently Asked Questions

Why should I encode HTML entities?

Encoding prevents text from being interpreted as markup, which avoids broken layouts and cross-site scripting (XSS) when handling user input.

What characters are encoded?

We encode the five reserved characters: & < > " and '. These are the ones that can break or inject into HTML.

Is this the same as a URL encoder?

No. URL encoding (%20, %3A) is for URLs; HTML entity encoding (&lt;) is for HTML markup. This tool handles HTML.

Does encoding affect accented characters?

No. Accented letters (é, ü) are left as-is because modern UTF-8 pages handle them natively.

Practical Example

Encoding <b>bold</b>:

  • Result: &lt;b&gt;bold&lt;/b&gt;
  • Browsers now display the literal text instead of bold markup.
Advertisement