HTML Entities: Encode & Decode

Turn &, <, >, " and other characters into HTML entities (encode), or turn &amp; and similar back into plain text (decode).

Input code
Result

Use cases

  • Inserting text containing &, <, > into HTML without breaking markup
  • Decoding entities coming from an RSS/XML feed
  • Preparing text for safe insertion into attributes

FAQ

Are all possible named entities recognized when decoding?

A broad set of common entities is recognized (amp, lt, gt, nbsp, copyright, etc.) plus all numeric ones (&#123; and &#x7B;) — that covers the vast majority of real cases, though the full HTML5 spec has several thousand rare named entities.

Can this decode HTML that has tags inside it?

The tool only replaces entity sequences with characters — it never executes or renders HTML, so tags stay as plain text.

Related tools