Zero Signup ToolsFree browser tools

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.

Direction

Turn text into HTML entities so it renders safely.

Encode mode

Use named entities like &,  , © where they exist, numeric otherwise.

58 chars / 60 bytes

How to use

  1. Pick a direction: Encode to escape characters, or Decode to unescape entities back to plain text.
  2. When encoding, choose a mode: Named for readable entities, Basic for XSS-safe minimum, Decimal or Hex for numeric references.
  3. Type or paste your text into the input area, or click a sample to load an example.
  4. 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 &,  , ©, —, and “ 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 —, and hex references like 😀, 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

All tools
All toolsDeveloper Tools