FTJ
← All Tools

HTML Entities Encoder / Decoder

Encode special characters to HTML entities or decode HTML entities back to text. Essential for web developers.

Common HTML Entities

CharacterEntity
<&lt;
>&gt;
&&amp;
"&quot;
'&apos;
&nbsp;
©&copy;
®&reg;
&euro;
£&pound;

Encode or decode HTML entities. Convert special characters like <, >, & to their entity equivalents (&lt;, &gt;, &amp;) and back.

How to use HTML Entities Encoder / Decoder

  1. Paste text containing HTML entities or special characters.
  2. Click Encode to convert characters to entities, or Decode to reverse.
  3. Copy the result for use in HTML or templates.

Features

  • Encodes &, <, >, ", and ' to HTML entities.
  • Decodes named and numeric entities back to characters.
  • Handles Unicode characters.
  • Bidirectional: encode and decode in one tool.

FAQ

What are HTML entities and why are they needed?

HTML entities let you display characters that have special meaning in HTML. The < and > characters are used for tags, so to display them as text you need &lt; and &gt;. Similarly, & must be written as &amp; to avoid being interpreted as the start of an entity.

Should I use named or numeric entities?

Named entities (&lt;, &amp;) are more readable. Numeric entities (&#60;, &#38;) work for any Unicode character. For ASCII special characters, named entities are standard. For Unicode, use numeric entities or just the character directly with UTF-8 encoding.

Do I need to encode entities in JavaScript strings?

No. HTML entities are only for HTML content. In JavaScript strings, use escape sequences (\u003C) or just the character directly. JavaScript does not interpret HTML entities.

Related Articles

Related Tools