HTML Entities Encode / Decode

Escape or unescape HTML special characters with named and numeric entity encoding.

About this tool

Encode characters like <, >, &, and quotes into HTML entities for XSS-safe snippets, CMS content, and XML/HTML debugging. Decode entity sequences back to plain text for editing or comparison.

What you get

  • Named entity encoding (&lt;, &gt;, &amp;, &quot;)
  • Numeric and hex entity forms where applicable
  • Decoded plain text from entity input
  • Live encode/decode as you type
  • Bidirectional mode switch
  • One-click copy of encoded or decoded string

How to use

Switch encode or decode, paste your string, and copy the result into HTML, XML, or your editor.

Related searches

  • html entities
  • html escape

FAQ

How to escape HTML special characters?

Paste your string in Encode mode to turn <, >, &, quotes, and other symbols into named or numeric HTML entities.

How to decode HTML entities online?

Switch to Decode and paste entity sequences like &amp; or &#39; to recover the original plain text.

What characters need HTML encoding?

At minimum encode <, >, &, and double quotes when inserting untrusted text into HTML to prevent markup injection and broken attributes.

When should I use HTML entity encoding?

Use it when displaying user input in HTML, preparing CMS content, or debugging XML/HTML snippets that must render safely.

How to escape ampersands in HTML attributes?

Encode & as &amp; inside attribute values and text nodes so browsers and parsers do not treat it as the start of another entity.

By using this tool you agree to our Terms of Use and Privacy Policy. Results are provided as-is without warranty.