Encode or Decode HTML

Paste your text, choose encode or decode, or enable live auto-conversion

Characters: 0

How It Works

  1. Paste your text in the input area
  2. Click Encode to escape HTML characters
  3. Click Decode to restore HTML entities
  4. Enable auto-convert for live updates

Common Use Cases

  • Display code snippets in blog posts
  • Sanitize user input for web pages
  • Prevent XSS vulnerabilities
  • Store HTML in database fields

Related Tools

Base64 Encoder / Decoder

Encode and decode Base64 strings with UTF-8 support.

URL Encoder / Decoder

Encode and decode URLs for web use.

Markdown to HTML

Convert Markdown to HTML with live preview.

Frequently Asked Questions

What does HTML encoding do?

HTML encoding converts special characters like <, >, &, and quotes into their corresponding HTML entities so they display correctly in HTML documents without being interpreted as markup.

When should I use HTML encoding?

Use HTML encoding when you want to display code snippets on a web page, prevent XSS attacks, or safely include user-generated content in HTML without breaking the page layout.

What is the difference between encode and decode?

Encoding converts special characters to HTML entities (e.g., < becomes &lt;). Decoding does the reverse, converting entities back to their original characters.

Is my text uploaded to a server?

No. All processing happens entirely in your browser. Your text never leaves your device.