Skip to content
zspace tools

SEO & Website Tools

HTML Entity Encoder & Decoder

Convert characters like &, <, > and quotes into HTML entities, or turn &amp;, &#169; and &#x1F600; back into readable text. Choose named, decimal or hex entities, and see any invalid or unknown entities flagged.

Runs in your browser

Features

What you get

  • Encode and decode

    Switch direction anytime, or feed the output straight back in.

  • Named, decimal or hex

    &copy;, &#169; or &#xA9; — your choice, with numeric fallbacks for characters without a name.

  • Flexible scope

    Encode just & < > and quotes, or every non-ASCII character too.

  • No double encoding

    Optionally keep existing valid entities so &amp; doesn't become &amp;amp;.

  • Spec-correct decoding

    All 2,231 named entities, numeric references, emoji and the HTML spec's edge cases.

  • Problems flagged

    Unknown names, missing semicolons and invalid code points are listed with explanations.

How to use

How to use the HTML Entity Encoder & Decoder

Encoding walks through your text one Unicode character at a time, so an emoji becomes one reference (&#x1F600;) rather than two broken halves. Special characters always encode; you can also encode every non-ASCII character as a named entity where one exists, or as decimal or hex. Decoding uses the HTML standard's rules — including legacy names without a semicolon and the replacement character for invalid code points — and lists anything unusual. Decoded results are only ever shown as plain text, never rendered.

  1. 01

    Choose a direction

    Encode text into entities, or decode entities into text.

  2. 02

    Paste your content

    The result updates as you type. Adjust the encoding options if needed.

  3. 03

    Copy or download

    Copy the result or download it as a .txt file.

Examples

Worked examples

  • Basic encoding

    Tom & Jerry < Special Characters > → Tom &amp; Jerry &lt; Special Characters &gt;

  • Non-ASCII as named entities

    café © 2026 → caf&eacute; &copy; 2026 (or caf&#233; &#169; 2026 as decimal).

  • Decoding with problems

    &copy 2026 decodes to © 2026 but is flagged for its missing semicolon; &zzz; is unknown and left as it is.

Technical specifications

Named entities
All 2,231 from the HTML standard
Numeric
Decimal &#…; and hex &#x…;
Unicode
Full range incl. emoji (one reference each)
Apostrophe
&#39; (works in HTML4 and HTML5)
Max text
5 million characters
Output
Plain text — never rendered

Privacy

Text is converted in your browser and never sent or stored.

Read the full privacy policy.

FAQ

HTML Entity Encoder & Decoder questions

HTML entities are codes such as &amp; or &#169; that stand for characters which would otherwise be read as HTML, or are hard to type. ZSpace Tools' HTML Entity Encoder & Decoder encodes text into entities and decodes all 2,231 named HTML entities plus decimal and hexadecimal references, following the HTML specification.

Encoding walks through your text one Unicode character at a time, so an emoji becomes one reference (&#x1F600;) rather than two broken halves. Special characters always encode; you can also encode every non-ASCII character as a named entity where one exists, or as decimal or hex. Decoding uses the HTML standard's rules — including legacy names without a semicolon and the replacement character for invalid code points — and lists anything unusual. Decoded results are only ever shown as plain text, never rendered.

In text, & and < must be encoded (> is encoded for safety). Inside attribute values, the quote character you use (" or ') must be encoded too.

Both work in modern browsers. Named entities like &copy; are easier to read; numeric ones work for every character, including those without a name, such as ₹ (&#8377;).

&apos; was only added in HTML5 and isn't recognised by some older HTML parsers. &#39; works everywhere.

It helps when placing text inside HTML content, but it isn't a complete defence. Safe output depends on the context (attributes, URLs, scripts, CSS). Use your framework's context-aware escaping and a sanitiser for untrusted HTML.

They're left as written and listed below the output — for example &zzz; or a numeric reference to an invalid code point, which browsers show as �.

No. Everything runs in your browser.