HTML Entity Encoder/Decoder
Encode text to safe HTML entities, or decode HTML entities back to plain text.
About this tool
Encode text into safe HTML entities (so special characters display correctly instead of breaking markup), or decode HTML entities back into plain, readable text.
Key Features
- Handles all named and numeric HTML entities
- Uses the browser's own HTML parser for accuracy
- Works both directions: encode and decode
- No server round-trip — everything stays in your browser
How to Use
- Paste your text or HTML.
- Click Encode to escape special characters, or Decode to convert entities back to text.
- Copy the result.
Benefits
- Safely embed user text inside HTML without breaking the page
- Read scraped or copy-pasted HTML that's full of &-style codes
- Debug HTML that displays entity codes instead of the intended characters
Frequently Asked Questions
Because those characters have special meaning in HTML: < starts a tag and & starts an entity reference. If your text contains them unescaped, a browser may misinterpret part of your content as markup, breaking the layout or, in the worst case, opening the door to injected code. Encoding them as & and < displays the literal character safely.
All of them — named entities like & < > " © , and numeric entities like © or ’. Decoding is done through the browser's own HTML parser rather than a hand-built lookup table, so it correctly handles the full HTML entity set, not just a handful of common ones.
It will encode or decode whatever text you paste, but encoding a full HTML document turns its tags into visible text (which is the point — it stops them from being interpreted as markup). If you want to keep tags functional and only escape the text content inside them, apply this to just the text portions, not the whole document.