All tools
Browser utility

HTML Entity Encoder and Decoder

Encode five HTML text characters or strictly decode references once, keeping output plain text with warnings for invalid references.

Your inputs stay in your browser.

Plain text only; no HTML preview. Source and output each at most 2 MiB UTF-8. Named references use the locally bundled entities 8 table, case-sensitive and semicolon-required; numeric references follow the strict scalar rules below. Drafts stay in memory only; refreshing clears them. Processing and exports stay local.

Enter values or try an example, then choose Calculate / Generate.

How to use HTML Entity Encoder and Decoder

Choose Encode or Decode, paste text and Calculate. Output is never rendered as HTML. Swap input/output is explicit and undoable. Decode uses the locally bundled entities 8 named-reference table and custom strict numeric-scalar validation, with no remote scripts or browser HTML parser.

Worked example

Encoding <b>Hi</b> produces &lt;b&gt;Hi&lt;/b&gt;. Decoding &amp;lt; produces &lt; after exactly one pass, not a less-than character. &#x1F600; becomes an emoji; &#xD800; stays literal with a warning.

Rules and limits

2 MiB UTF-8 source/output, counts are Unicode code points. Encode replaces &, <, >, double quote and apostrophe only. Decode requires semicolons; names are case-sensitive and can expand to multiple code points. Numeric scalars must be U+0001-U+10FFFF excluding surrogates; no legacy numeric remapping. Unknown or malformed candidates remain literal. Not a sanitizer or escaping tool for scripts, CSS, URLs or arbitrary HTML insertion.