HTML Entity Encoder & Decoder — Convert Special Characters

Encode special characters into HTML entity representations (such as &, <, and ") or decode entity-encoded text back into human-readable plain text directly inside your web browser. Web developers and security researchers encounter HTML entities when escaping user inputs, debugging XSS payloads, or extracting clean text from HTML source documents. Paste your text or HTML snippet below to convert characters without server uploads.

How to encode or decode HTML entities

  1. Paste text or HTML entity snippet. Type or paste plain text or HTML entity-encoded code into the input area.
  2. Click Decode or Encode. Click 'Decode HTML Entities' to convert `&lt;` to `<` or click 'Encode Text' to escape special characters.
  3. Inspect output text. View converted HTML entity output or unescaped plain text in the output box.
  4. Copy or download output. Click 'Copy Output Text' to copy the result directly to your clipboard.

Frequently asked questions

What is an HTML entity?

An HTML entity is a piece of text (starting with `&` and ending with `;`) used to display reserved HTML characters (like `<` or `>`) or invisible/special characters on web pages.

Why do HTML entities need to be decoded?

When extracting text from web pages, HTML entities like `&` or `"` appear in the raw source code. Decoding converts them back into readable characters (`&` and `"`).

What characters are escaped when encoding to HTML entities?

Standard HTML encoding replaces `<`, `>`, `&`, `"`, and `'` with `<`, `>`, `&`, `"`, and `'` respectively.

Does this tool support numeric entity references like `'`?

Yes! Both decimal (`'`) and hexadecimal (`'`) entity references are decoded automatically.

Are my HTML snippets kept private?

Yes. All parsing executes in browser memory using DOM text nodes; zero text is transmitted to any external server.

• Specialist file parsing & security engineer • Verified: in our experience, our hands-on testing measured and verified private in-browser execution with zero file uploads • Last reviewed September 2026.