HTML Entity Encoder & Decoder

Encode and decode HTML entities online. Escape <, >, &, and quotes for safe markup, or convert entities back to characters. Free and client-side.

// html entitiesencode○ ready
Raw
Encoded

About this HTML entity tool

When you want to display code or user-supplied text on a web page, characters like < and & must be escaped so the browser renders them literally instead of treating them as tags. This tool escapes text into safe HTML entities and decodes entities back into plain characters — both directions, in your browser.

How to use it

  1. Choose Encode to escape text or Decode to convert entities back.
  2. Paste your input on the left.
  3. Copy the result from the right.

Frequently asked questions

What does HTML entity encoding do?
It replaces characters that have special meaning in HTML — like <, >, &, and quotes — with safe entity equivalents (&lt;, &gt;, &amp;, &quot;). This prevents text from being interpreted as markup and helps avoid injection bugs.
When should I encode non-ASCII characters?
Enable “Non-ASCII” to convert accented letters, symbols, and emoji into numeric entities (&#nnn;). This is useful when a system or email client may not handle UTF-8 reliably.
Does it handle named and numeric entities when decoding?
Yes. Decoding understands common named entities (&amp;, &copy;, &mdash;, …) as well as decimal (&#169;) and hexadecimal (&#xA9;) numeric references.

// More tools