HTML entity encoder / decoder
Escape HTML special characters or decode named and numeric references as safe plain text, with a live preview.
How it works & useful details
How to use this tool
Encode special characters or every character; switch to Decode to read character references as text.
Details and limits
Decodes all HTML5 named character references with a semicolon, plus decimal and hexadecimal Unicode scalar references. Unknown references and references without semicolons are unchanged. Decoding is one pass, and rejects NUL, surrogate, or out-of-range numeric references. This is character-reference conversion, not HTML parsing or legacy numeric-code remapping.
Tags and scripts are displayed as text and never inserted as HTML. Up to 100,000 input code units; live preview up to 8,000.
