Nexvert100% Client-Side
Developer Tools

HTML Entity Encoder & Decoder

Escape special characters into safe HTML entities (<, >, &, ") and unescape HTML-encoded strings.

  • 100% free
  • Files stay on your device
  • No sign-up, no watermark

What is HTML Entity Encoder & Decoder?

The HTML Entity Encoder escapes characters that have special meaning in HTML — < > & " ' — into entities like &lt; and &amp;, so code samples and user text display literally instead of being interpreted as markup. Unescape mode does the reverse, turning entity-encoded text back into readable characters. Escaping user-supplied text is also a basic defence against HTML injection in templates.

How to use HTML Entity Encoder & Decoder

  1. 1

    Choose Escape or Unescape

    Pick whether to encode characters or decode entities.

  2. 2

    Paste your text

    Enter HTML, code or text in the input box.

  3. 3

    Copy the output

    The converted text appears instantly and can be copied.

Frequently asked questions

Which characters are escaped?

The five HTML-significant characters: < > & " and '. This is enough to display text safely inside HTML content and attributes.

Is escaping enough to prevent XSS?

It protects text placed inside HTML content and quoted attributes. JavaScript, URL and CSS contexts need their own escaping rules.

Can it decode named entities like &nbsp; or &copy;?

Yes. Unescape mode uses the browser’s HTML parser, which understands named and numeric entities.

Last updated: