HTML Encode / Decode

Escape text into HTML entities or decode entities back to plain text. Handles named and numeric references, all in your browser.

Independently verified for accuracy

Calculator by Toolsloft ↗

Escape text so it displays as-is inside HTML, or decode HTML entities back into plain characters. Encoding replaces the five characters that break markup (& < > " and the apostrophe), which is what you want before dropping user text into a page. Decoding also understands numeric references and common named entities like &copy; and &euro;.

How this is calculated

Encoding replaces &, <, >, double quote, and apostrophe with &amp;, &lt;, &gt;, &quot;, and &#39; in that order, matching the standard HTML escaping used to prevent markup injection. Decoding resolves decimal (&#65;) and hexadecimal (&#x41;) character references plus a set of common named entities.

How to use

  1. Choose encode to escape text, or decode to convert entities back.
  2. Paste your text into the input box.
  3. Copy the converted result from the output box.

Examples

  • Encode: <b>Tom & Jerry</b> → &lt;b&gt;Tom &amp; Jerry&lt;/b&gt;
  • Decode: &copy; 2026 → © 2026

FAQ

Which characters does encoding escape?
Encoding replaces the five characters that can break HTML: the ampersand, less-than, greater-than, double quote, and apostrophe. That is enough to safely place text inside element content or an attribute value.
What entities can it decode?
Decoding handles decimal references like &#65;, hexadecimal references like &#x41;, and common named entities including &amp;, &lt;, &gt;, &quot;, &copy;, &reg;, &trade;, &euro;, &pound;, and &cent;. Unknown entities are left unchanged.
Is my text uploaded anywhere?
No. Encoding and decoding happen entirely in your browser, so your text never leaves the page.

Embed this calculator

Add this free calculator to your own site. Copy the code and paste it where you want it to appear.