HTML Entity Decoder & Encoder

Decode HTML entities (' & " — numeric and named) to plain text, or encode text for HTML. Runs in your browser. No upload, runs 100% in your browser

How to use this tool

  1. Paste or drop your input above.
  2. The tool processes it locally, usually instantly.
  3. Copy the output or download the result.

Why entities exist at all

HTML reserves certain characters: < starts a tag, & starts an entity. To display them literally, pages encode them as entities, &lt;, &amp;, either by name (&copy;) or by numeric code point (&#169;, &#xA9;). Decoding turns them back into real characters; encoding escapes the five characters that matter so text can be embedded in HTML safely.

The classic bug this fixes

Copy text out of a web page and you get strings like R&amp;D '26. Paste it into a document and it reads wrong; decode it here and it becomes R&D '26. The reverse bug, double encoding, happens when a system encodes an already-encoded string: &amp;amp; decodes to &amp; decodes to &. This page decodes one level per run, so running it repeatedly is always safe and predictable.

Coverage, stated honestly

Numeric references (&#8212;, &#x2014;) are decoded for any valid code point. Named entities cover the full set that matters in practice, the 250-odd names from the HTML4 Latin-1 and symbols/punctuation sets plus the XML core. Exotic HTML5-only names (like &apos; alternatives for every emoji) are intentionally out: if a name is unknown it is passed through untouched rather than guessed.

Frequently Asked Questions

Are my files uploaded to a server?

No. Everything on this page runs inside your browser using JavaScript and WebAssembly. Your file never leaves your device, you can even disconnect from the internet after the page loads and the tool still works.

Should I encode every special character in my text?

No, only &amp;, &lt;, &gt; and the quotes in attributes ever need escaping in HTML. Accented letters and emoji can be pasted literally in any modern page.

What's the difference between &amp;#39; and &amp;apos;?

They mean the same character ('). Numeric forms work everywhere; &amp;apos; is not valid in HTML4, which is why this tool encodes the apostrophe as &amp;#39;.

Is this the same as URL encoding (%20 etc.)?

No, that's percent-encoding for URLs, a completely separate mechanism. This page handles HTML entities only.

Related Tools

XML FormatterLine CounterChinese Word CounterX/Twitter Character CounterYAML to JSONJSON to YAMLCSV to JSONCSV to ExcelExcel to CSVXML to CSVCSV to XMLCase ConverterKebab Case ConverterJSON DiffDOCX to TXT