🛝Toolio
All tools

🏷️ HTML Entity Encoder / Decoder

Encode HTML special characters to safe entities or decode entities back to readable text — all in real time, entirely in your browser with no data sent anywhere.

Input
Output

About

This tool handles HTML entity encoding and decoding directly in your browser using JavaScript — no server, no upload, no account. It converts the five essential HTML characters (& < > " ') to their named entities (&amp; &lt; &gt; &quot; &#39;) to prevent XSS and markup breakage. An optional mode also encodes all non-ASCII characters as numeric entities (&#NNN;), which is useful for environments that require pure ASCII output. Decoding reverses the process, turning both named entities like &copy; and numeric forms like &#169; back into their original characters. Results update in real time as you type.

How to use

  1. Paste or type your text into the input box on the left.
  2. Choose a mode: Encode (text → entities) or Decode (entities → text).
  3. When encoding, optionally enable 'Encode all non-ASCII' to convert characters like é, ©, or emoji to numeric entities.
  4. The output updates in real time — copy it with the Copy button.

FAQ

What is an HTML entity?
An HTML entity is a text sequence that represents a character which would otherwise be interpreted as HTML markup. For example, &lt; represents < so the browser displays a less-than sign instead of treating it as a tag.
Which characters are encoded by default?
By default the tool encodes the five characters that break HTML: & becomes &amp;, < becomes &lt;, > becomes &gt;, " becomes &quot;, and ' becomes &#39;. Enable the non-ASCII option to also encode accented letters, symbols, and emoji.
Can it decode both named and numeric entities?
Yes. The decoder handles named entities like &copy; and &eacute;, decimal numeric entities like &#169;, and hexadecimal numeric entities like &#xA9; — all converted back to their Unicode characters.
Is my text sent to a server?
No. All encoding and decoding runs locally in your browser using JavaScript. Nothing leaves your device.
When should I use numeric entity encoding for non-ASCII characters?
Use it when your output must be pure ASCII — for example, legacy email systems, certain XML parsers, or older CMS platforms that do not reliably handle UTF-8. For modern UTF-8 HTML, encoding only the five special characters is sufficient.