HTML Entity Encoder / Decoder

Encode or decode HTML entities — &, <, > and all special characters. Works 100% in your browser.

Plain text / HTML
Encoded HTML
0 characters · 0 entities
Common HTML entities reference

How to encode and decode HTML entities

Convert special characters to safe HTML entities and back — with named entities, numeric codes and a full reference table.

⌨️

1. Paste your text

Drop in raw text with special characters, or HTML with entities you want to read.

🔁

2. Encode or decode

Encode turns < > & " into &lt; &gt; &amp; &quot;. Decode turns entities back into characters.

📋

3. Copy the result

One click to copy. Use named entities (&copy;) or numeric (&#169;) — both decode identically.

Encoding matters whenever user text is placed inside HTML: unescaped < and & characters break markup and enable XSS injection. Encode anything a user typed before rendering it. Also handy for showing code examples on a page. For URLs use percent-encoding instead — see the Text Tools URL encoder, and for Base64 use the Base64 tool.

HTML entity FAQ

What are HTML entities?

Entities are safe spellings of characters that have special meaning in HTML. &lt; means <, &gt; means >, &amp; means &, and &quot; means a double quote. Browsers render the entity as the character.

When should I encode HTML entities?

Whenever text that a user typed is inserted into a page — otherwise a value like <script> executes as code (XSS). Also when you want to display HTML source as visible text in a tutorial or blog post.

What is the difference between named and numeric entities?

Named entities like &copy; are readable; numeric ones like &#169; or hex &#xA9; work for every Unicode character even where no name exists. Browsers treat them identically.

Does this tool handle curly quotes and em dashes?

Yes — typographic characters like “ ” ‘ ’ — – … © ® ™ all encode to their correct entities (&ldquo;, &mdash;, &hellip;, and so on) and decode back.