Skip to content
100% Local — never leaves your browser
Click to run, or auto-update

HTML Entity Encoder/Decoder

Encode text to HTML entities or decode HTML entities back to plain text instantly in your browser.

HTML-encoded

How to use this tool

HTML entities are how you safely represent characters that would otherwise be interpreted as markup — like < and & — or characters outside the basic ASCII set, like accented letters and symbols. Developers use this to escape user-generated content before inserting it into an HTML template (preventing it from breaking the page or enabling injection attacks), or to decode entities they find in a page's source or an API response back into readable text.

For example, <b>Tom & Jerry</b> encodes to &lt;b&gt;Tom &amp; Jerry&lt;/b&gt; — safe to display as literal text instead of being rendered as bold markup.

Choose Encode or Decode depending on what you want to do, paste your input into the box on the left, then click Convert. The result appears in the output box on the right. Switch on Auto update to re-run it as you type instead of clicking each time.

FAQ

Is this HTML entity encoder/decoder free to use?

Yes, this tool is completely free to use with no limits on how often you can use it.

Does my text get uploaded anywhere?

No. All encoding and decoding happens directly in your browser. Your data never leaves your computer.

What exactly does Encode convert?

Encode escapes the 5 characters that are unsafe to embed directly in HTML markup: & becomes &amp;, < becomes &lt;, > becomes &gt;, " becomes &quot;, and ' becomes &#39;. This is the same escaping browsers expect so that text is displayed literally instead of being interpreted as markup.

What kinds of entities does Decode understand?

Named entities (like &amp; or &eacute;) covering the standard HTML4 Latin-1 and special-character sets, plus numeric entities in both decimal (&#233;) and hexadecimal (&#xE9;) form — which together can represent any Unicode character. Anything that isn't a recognized entity, including a plain "&" in ordinary text like "Tom & Jerry", is left untouched rather than flagged as an error.

Related Tools