Mentigo Icon
MentigoInstrument deck
deck Data & Code Utilities HTML Entity Encoder / Decoder
Back to deck
Data & Code Utilities

HTML Entity Encoder / Decoder

Escape special characters into named, decimal, or hex HTML entities — or decode entity-encoded strings back to plain text.

Runs privately in your browser — your input is never uploaded or tracked.

HTML Entity Encoder / Decoder Online

Escape special characters into HTML entities or decode entity-encoded strings back to plain text with this free online tool. Characters like <, >, &, and quotes break markup or get swallowed by browsers unless they are properly escaped — this encoder converts them to named (&lt;), decimal (&#60;), or hexadecimal (&#x3C;) entities in one click.

It is essential for displaying code snippets inside HTML, cleaning up scraped content full of &amp; and &quot;, preparing text for XML/RSS feeds, and understanding what an encoded string actually says. Encoding untrusted text before rendering is also a fundamental defense against cross-site scripting (XSS).

How to Encode or Decode HTML Entities

  1. Paste your text

    Enter raw text with special characters, or an entity-encoded string you want to read.

  2. Choose encode or decode

    Encode converts special characters to entities; decode converts entities back to readable characters.

  3. Pick the entity style

    Choose named entities (&copy;), decimal (&#169;), or hex (&#xA9;) depending on your target format.

  4. Copy the result

    One click copies the converted string, ready for your HTML, XML, or template.

Features of the HTML Entity Converter

  • Named, decimal, and hex entities

    Output in whichever entity notation your format requires — HTML, XML, or legacy systems.

  • Full entity table support

    Handles the complete set of named entities, from &amp; and &lt; to typographic symbols like &mdash; and &hellip;.

  • Two-way conversion

    Decode messy double-encoded strings (&amp;amp;) step by step to recover the original text.

  • Unicode-safe

    Emoji, accented characters, and non-Latin scripts encode to correct numeric references.

  • Client-side processing

    Nothing you paste is uploaded — safe for user data and production content.

Frequently Asked Questions

What are HTML entities?

HTML entities are escape sequences that represent reserved or special characters in markup — for example &lt; renders as < and &amp; renders as &. They prevent browsers from interpreting content as HTML tags.

Which characters must always be escaped in HTML?

At minimum: < (&lt;), > (&gt;), and & (&amp;) in content, plus " (&quot;) and ' (&#39;) inside attribute values. Escaping these is also the first line of defense against XSS.

Why does my page show &amp; instead of &?

The text was encoded twice. Paste it into the decoder — one pass turns &amp; into &, a second pass yields the plain &. Then fix the pipeline stage that double-encodes.

Should I use named or numeric entities?

Named entities (&copy;) are more readable in HTML. Numeric entities (&#169; or &#xA9;) work everywhere, including XML formats where most named entities are undefined.