Conversion 100% in your browser

HTML Entities Encoder and Decoder — Free Online Tool

Encode special HTML characters into entities (& becomes &) or decode entities back to characters. Named, decimal, or hex output. Minimal or full scope.

Mode:
Scope:
Format:

HTML Entities Encoder and Decoder — Convert Special Characters Safely

Encode characters like &, <, >, ” into their safe HTML entity form so they don’t break your page, or decode entities back to readable characters. The tool uses your browser’s native HTML parser for decoding, which understands every named entity ever defined (including obscure ones like &hearts; or &forall;), plus all numeric entities &#NN; and &#xHH;.

Scope: how many characters to encode

  • Minimal (default): only the five characters that MUST be encoded in HTML: & < > ” ‘ — perfect when your page is already UTF-8 and only need to escape syntax-breaking chars
  • + Non-ASCII: also encodes all characters above ASCII 127 (é, ñ, ç, €, emoji) — useful for legacy systems that don’t support UTF-8
  • + All named: encodes every character that has a recognized named entity (© ® ™ – — ‘ ‘ ” ” • … etc.) — best for maximum compatibility and readability

Format: how to express the entity

  • Named (default): uses the readable form: &amp;, &lt;, &copy;, &trade; — most human-friendly
  • Decimal: uses &#NNN; — e.g. &#38; for &. Works for ANY Unicode character even without a named entity
  • Hex: uses &#xHH; — e.g. &#x26; for &. Common in XML and some legacy systems

Decoding

Decoding works for every entity, regardless of format: &amp;, &#38;, &#x26; all decode to &. Even obscure HTML5 entities like &ouml; (ö), &forall; (∀), or &diamondsuit; (♦) are handled correctly because we use the browser’s own HTML parser.

Common uses

  • Safely embedding user-generated content into HTML
  • Pasting HTML code samples into a blog post without rendering them
  • Converting Unicode content for XML feeds (RSS, Atom)
  • Cleaning up data scraped from web pages
  • Debugging encoding issues in CMS imports/exports

Privacy

Everything runs in your browser. Your text is never uploaded.