Skip to content
SmaftyTools

HTML Entity Encoder

Encode special characters as HTML entities or decode entities back to text. Handles named, decimal and hex entities.

Output

Output will appear here

About HTML Entity Encoder

The HTML Entity Encoder converts special characters — like <, >, & and quotes — into their HTML entity equivalents, and decodes entities back to plain text. Encoding is essential whenever you need to display code or user text inside an HTML page without the browser interpreting it as markup.

The decoder understands named entities (&amp;, &copy;, &mdash; and dozens more), decimal (&#233;) and hexadecimal (&#xE9;) forms. An optional mode also encodes every non-ASCII character numerically, useful for systems that mangle UTF-8.

How to Use the HTML Entity Encoder

  1. Choose Encode or Decode mode.
  2. Paste your text or entity-encoded HTML.
  3. Copy the converted result.

Features

  • Encodes the five HTML-critical characters (& < > " ')
  • Optional numeric encoding of all non-ASCII characters
  • Decodes named, decimal and hex entities
  • Instant, client-side conversion

Frequently Asked Questions

When do I need HTML entities?

Whenever text could be interpreted as markup: showing code snippets on a page, inserting user content into HTML, or writing characters like < and & in documentation. Encoding prevents broken layouts and XSS injection.

What's the difference between &#233; and &#xE9;?

Both represent é. &#233; uses the decimal code point; &#xE9; uses hexadecimal. Browsers accept either form.

Is the HTML Entity Encoder free?

Yes, the HTML Entity Encoder is completely free with no usage limits. No signup, no account and no installation required.

Is my data safe?

Yes. All processing happens locally in your browser using JavaScript — nothing you type is uploaded or stored on our servers.