Developer Tools
HTML Entity Encoder Decoder
Encode text into HTML entities and decode HTML entities back to text in your browser. Named, decimal, and hex references with live stats.
Turn text into HTML entities so it renders safely.
Use named entities like &, , © where they exist, numeric otherwise.
How to use
- Pick a direction: Encode to escape characters, or Decode to unescape entities back to plain text.
- When encoding, choose a mode: Named for readable entities, Basic for XSS-safe minimum, Decimal or Hex for numeric references.
- Type or paste your text into the input area, or click a sample to load an example.
- Use Copy output to grab the result, Swap to feed the output back in for round-tripping, or Clear all to reset.
About this tool
HTML Entity Encoder Decoder converts text into HTML character references and turns those references back into the original characters. Pick Encode and choose how aggressive the escape should be: Named uses readable references like &amp;, &nbsp;, &copy;, &mdash;, and &ldquo; where they exist and falls back to numeric for the rest; Basic only escapes the five XSS-critical characters (&, <, >, double quote, and apostrophe) and leaves Unicode untouched; Decimal turns every non-ASCII character into a &#NNN; reference; Hex turns every non-ASCII character into a &#xHHHH; reference. Pick Decode to reverse the operation: the tool understands named entities, decimal references like &#8212;, and hex references like &#x1F600;, including astral code points outside the basic multilingual plane. Live stats show how many characters were escaped or recovered, how many entities the output contains, and the byte size in UTF-8 so you know exactly what you are pasting into your HTML, JSON, email template, or CMS field. Unknown entity names are kept verbatim and listed back to you, so a typo never silently corrupts your text. Everything runs entirely in your browser, so the content you are escaping (form input examples, sanitized snippets, contract clauses) never leaves your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
URL Encoder Decoder
Encode and decode percent-encoded URLs.
Open tool
DeveloperBase64 Encoder Decoder
Encode and decode Base64 with full Unicode.
Open tool
DeveloperJSON Formatter
Format, minify, and validate JSON in your browser.
Open tool
DeveloperRegex Tester
Live regex testing with highlights, capture groups, and replacement preview.
Open tool