HTML Entity Encode / Decode

Encode special characters to HTML entities or decode HTML entities back to plain text.

Common HTML Entities

Character Entity Name
&&Ampersand
<&lt;Less than
>&gt;Greater than
"&quot;Double quote
'&#39;Single quote
 &nbsp;Non-breaking space
©&copy;Copyright
®&reg;Registered

How to Use

  1. 1Paste your text or HTML entity string into the input field.
  2. 2Choose Encode to convert special characters to entities, or Decode to convert entities back to characters.
  3. 3View the result in the output area.
  4. 4Copy the output for use in your HTML source code.

Frequently Asked Questions

What are HTML entities?

HTML entities are special codes that represent characters which have meaning in HTML (like < and >) or characters that are hard to type directly. For example, &lt; represents the less-than sign (<).

When should I use HTML entity encoding?

Use it whenever you display user-generated content in HTML to prevent XSS attacks, or when you need to display characters like <, >, &, and quotes without the browser interpreting them as HTML markup.

What is the difference between named and numeric HTML entities?

Named entities use human-readable names like &amp; for &. Numeric entities use decimal (&#38;) or hexadecimal (&#x26;) codes. All three forms are valid HTML.