HTML Encoder

Characters: 0

Common HTML Entities

&→&
<→&lt;
>→&gt;
"→&quot;
'→&#39;
©→&copy;
®→&reg;
™→&trade;
€→&euro;
£→&pound;
¥→&yen;
→&nbsp;

What is HTML Encoder/Decoder?

The HTML Encoder/Decoder is an essential tool for handling HTML special characters. Convert <, >, &, " and other special characters to HTML entities (like &lt;, &gt;, &amp;) to prevent XSS attacks and HTML injection. Supports four modes: standard encoding (common entities), decoding (entity restoration), numeric encoding (all chars to &#NNN;), and named entity encoding (special symbols like ©, ®, ™). All processing runs locally in your browser.

▶Use Cases5 scenarios
  • ◆Preventing XSS attacks
  • ◆HTML content escaping
  • ◆Email template encoding
  • ◆Special symbol insertion
  • ◆Data sanitization
▶How to Use4 steps
  1. 1Enter text to encode/decode
  2. 2Choose processing mode
  3. 3Click process button
  4. 4Copy the result
▶Features6 features
  • ✓Four encoding modes
  • ✓Live character count
  • ✓One-click copy
  • ✓Swap input/output
  • ✓Common entity reference
  • ✓Runs in browser
▶FAQ5 questions
What is HTML Encoder/Decoder?

An online HTML entity encode and decode tool. Supports standard, numeric, and named entity encoding.. Everything runs locally in your browser — no uploads.

What is HTML entity encoding?

HTML entity encoding converts special characters (like <, >, &) to HTML entities (like &lt;, &gt;, &amp;) so browsers display them as text instead of parsing them as HTML tags.

Why should I HTML encode?

To prevent XSS (cross-site scripting) attacks and ensure user input is safely displayed rather than executed. Encoding is essential when rendering user-submitted content.

What is the difference between numeric and named encoding?

Numeric encoding converts all characters to &#NNN; format (e.g., &#60; = <), while named encoding uses entity names (e.g., &lt; = <). Numeric encoding has better compatibility.

Can encoded content be decoded?

Yes. Use the decode mode to restore HTML entities back to their original characters.