HTML Entity Encoder

Encode special characters for HTML or decode HTML entities.

Enter text to begin.

About the HTML Entity Encoder

Special characters like < and & have meaning in HTML. Encoding them as entities lets you display them as text and helps prevent markup problems.

How to use the HTML Entity Encoder

  1. Paste your text or HTML.
  2. Choose encode or decode.
  3. Copy the result.

Worked example

The text <p> encodes to &lt;p&gt;.

HTML Entity Encoder FAQ

Why encode HTML entities?

So that characters like < and & display as text instead of being read as markup.

Does encoding prevent XSS?

Escaping output is one important defense, but it must be applied correctly in context. It is not a complete security solution on its own.

What is &amp;?

It is the entity for the ampersand character.

Related tools

URL Encoder / Decoder · Base64 Encoder / Decoder · JSON Formatter · All developer tools · Guides

Reviewed 2026/11/08 by the ATOMOS Tools editorial team. Results are estimates for general information.

RECOMMENDED FREE DOWNLOAD

Developer Data Utilities Cheat Sheet

Quick references for JSON, Base64, URL encoding, HTML entities, timestamps, UUIDs, and data sizes.

Get the Free PDF →