HTML Entity Encode / Decode
Encode special characters into HTML entities or decode entities back to text. Encoding presets cover the five markup-breaking characters, attribute-safe escaping, text-node escaping, every non-ASCII character, or everything; the entity style (named, decimal, hex) applies consistently, and existing entities are preserved so nothing is double-encoded. Decoding follows the HTML5 parser: all 2,125 named references, decimal and hex numeric references, legacy names without a semicolon and the Windows-1252 remap, with unknown or invalid references reported. A sanitised live preview shows how the output renders.
Output will appear here…
The five characters that can break markup: & < > " '. What most template engines escape by default. Characters without a name fall back to a hex reference.
Related tools
URL Encode / Decode
Percent-encode text with encodeURIComponent, encodeURI, form or RFC 3986 rules, decode multi-layer strings, and edit query strings in a table.
String Escape / Unescape
Escape or unescape strings for JSON, JS, HTML, XML, URL, regex, shell, CSV, SQL, Python, Java, C#, Go, YAML and .properties.
Unicode Escape / Unescape
Convert text to \uXXXX, \u{…}, \x, U+, &#x…;, Python, Go or CSS escapes and back, and inspect every code point for invisible or look-alike characters.
HTML / CSS Prettifier
Beautify or minify HTML, CSS, SCSS, Less, JS, TS, JSON, YAML, Markdown and more — with preview and lint.
How to use HTML Entity Encode / Decode
- 1Pick Encode or Decode and paste your text or HTML — the output updates as you type.
- 2When encoding, choose a preset: Minimal (& < > " '), Attribute-safe, Text node, All non-ASCII or Everything, and pick named, decimal or hex references.
- 3Leave "Keep existing entities" on so text that already contains & or © is not encoded twice.
- 4When decoding, read the notices: unknown names, out-of-range numbers, legacy references without a semicolon and C1 remaps are all listed with the exact reference.
- 5Check the rendered preview (sanitised with DOMPurify) to see how a browser would display the output, then copy or download.
About HTML Entity Encode / Decode
Encode special characters into HTML entities or decode entities back to text. Encoding presets cover the five markup-breaking characters, attribute-safe escaping, text-node escaping, every non-ASCII character, or everything; the entity style (named, decimal, hex) applies consistently, and existing entities are preserved so nothing is double-encoded. Decoding follows the HTML5 parser: all 2,125 named references, decimal and hex numeric references, legacy names without a semicolon and the Windows-1252 remap, with unknown or invalid references reported. A sanitised live preview shows how the output renders.
HTML Entity Encode / Decode is part of FizzKit — a collection of focused developer and ad-tech tools. Because everything runs locally, it works offline once loaded and never exposes your data to a remote server.