HTML Entity Encoder

Encode text to HTML entities (&, <, >, quotes) or decode entities back — with an optional mode for numeric references for all non-ASCII characters.

Developer Tools 100% in your browser

How to use

  1. Choose Encode or Decode.
  2. Optionally enable numeric entities for non-ASCII characters.
  3. Paste the text and copy the result.

Example

Input: Say "hi" & <b>bye</b>

Output: Say &quot;hi&quot; &amp; &lt;b&gt;bye&lt;/b&gt;

How it works

Encoding replaces characters such as <, > and & with their HTML entities (&lt;, &gt;, &amp;), so the text displays literally instead of being read as markup.

Limits & compatibility

  • Encoding covers the five XML-critical characters plus the apostrophe.
  • Named decoding covers the common set (&amp; &lt; &gt; &quot; &#39; &apos; &nbsp;); all numeric references decode.
  • This escaping is for text nodes and attributes — never paste untrusted HTML.

Privacy

All processing runs locally in your browser. Nothing is transmitted, logged or stored.

Related tools

FAQ

Questions about HTML Entity Encoder

Is my input private?

Yes. This tool runs entirely in your browser — your input never leaves your device, is never uploaded to a server and is never stored.

How accurate is the result, and what are the limits?

The tool page states its formula and limits openly. Check them before relying on a result, and verify anything consequential — financial, legal, medical or safety-critical — against an authoritative source.

What happens to files I open with this tool?

Files are processed locally in your browser and never uploaded; closing the tab discards them. Text tools never store what you paste — it lives only in the page while you use it.