HTML Entity Encoder / Decoder

Encode special characters as HTML entities (< → &lt;) or decode entities back to text.

Runs in your browser Free
Processed locally in your browser.

What are HTML entities?

Characters such as <, >, & and quotes have special meaning in HTML. To show them as text you use entities like &lt;, &gt;, &amp; and &quot;. Proper escaping keeps your layout intact and prevents XSS vulnerabilities.

Encoding options

  • Encode only the special HTML characters
  • Convert every non-ASCII character (é, ç, €, emoji) to a numeric entity
  • Encode everything

Decoding

Turns named and numeric entities such as &amp;, &#39;, &#x27; and &uuml; back into readable characters. Ideal for email templates, CMS content and text from databases. Processing happens in your browser.

How to use HTML Entity Encoder / Decoder

  1. Paste text or HTML entities.
  2. Choose encode or decode.
  3. Set the encoding scope.
  4. Copy the result.

Why use this tool?

Makes it easy for web developers to produce safe HTML output and fix text that looks garbled.

FAQ

Which characters must be escaped in HTML?

At least & < > and, inside attributes, " and '. On UTF-8 pages the rest is optional.

Do I need to encode accented characters?

Not on UTF-8 pages. Numeric entities can be safer for old email clients or systems with other encodings.

What is &nbsp;?

A non-breaking space; it keeps two words from being split at a line end.

Related tools