HTML Entity Encode / Decode

Escape or unescape HTML entities such as < > and &.

Help Us Improve
4.9 (0)

How to use HTML Entity Encode / Decode

Three quick steps — no sign-up needed

  1. Step 1

    Choose Encode or Decode

    Encode escapes special characters; Decode turns entities back into characters.

  2. Step 2

    Paste the text or markup

    Enter content that contains <, >, &, quotes, or existing entities.

  3. Step 3

    Copy the result

    Use encoded text safely in HTML or recover readable text from entities.

About HTML Entity Encode / Decode

HTML Entity Encode / Decode escapes characters that have special meaning in HTML (&, <, >, quotes) or reverses that escaping. Developers searching "HTML escape online", "decode HTML entities", or "htmlspecialchars" need safe rendering of user text.

Select Encode or Decode, paste input, and copy output. Encoding is essential when injecting untrusted text into HTML to reduce XSS risk - but it is only one layer of a full security strategy.

Not every Unicode character needs a named entity; numeric entities also appear in the wild. Decode carefully when cleaning content from CMS exports.

A text utility for markup safety - not a complete HTML sanitizer by itself.

Benefits of HTML Entity Encode / Decode

Encode and decode Both directions for content workflows.
Safer display of symbols Reduce accidental tag injection from plain text.
CMS and email cleanup Fix double-encoded content from exports.
Fast browser tool No PHP/Python one-liner required.

Frequently asked questions

What does HTML encoding do?

It replaces special characters with entities so browsers show them as text instead of markup.

Does encoding stop all XSS?

No - it helps for HTML text contexts but attribute/JS contexts need their own rules.

Why is my content full of &amp;?

Often double-encoding - try Decode once or twice carefully.

Should I encode entire HTML documents?

Usually encode only untrusted text nodes, not your own tags.

Is this a sanitizer?

No - pair with proper sanitization libraries for rich HTML.