Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

HTML Entity Encoder

Escape &, <, >, quotes, and non-ASCII characters as HTML entities, or decode named and numeric entities back to text.

Processed locally in your browser — nothing is uploaded.

0 characters

Encoded HTML

Output appears here…

About HTML Entity Encoder

Encoding turns the five characters that break markup — & < > " ' — into safe entities, so user-supplied text can sit inside a page or an attribute without changing its structure. Turning on non-ASCII encoding also converts accents, emoji, and symbols to numeric references for environments stuck on ASCII.

Decoding goes the other way and understands named entities (&amp;, &nbsp;, &mdash;, &euro; and many more) alongside decimal (&#233;) and hexadecimal (&#x1F389;) references. Anything it does not recognise is left exactly as it was, so nothing is silently mangled.

Common uses

  • Escape a code snippet so it displays as text instead of rendering
  • Read a scraped page or email where entities were double-encoded
  • Convert accented characters to numeric entities for a legacy template

Example

Input

Fish &amp; Chips &copy; 2024 &mdash; caf&eacute;

Output

Fish & Chips © 2024 — café

Limitations

  • Decoding covers a broad table of common entities, not every one of the ~2,200 names in the HTML spec