Code · Made a little simpler

HTML Entity Encoder and Decoder

Encode markup characters or Unicode as HTML references and decode them locally. Compare text, attribute and strict decoding and download the result.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

HTML Entity Encoder and Decoder: how to use it

  1. Choose Encode text or Decode references.
  2. Paste text or select a UTF-8 file, then choose an encoding style or decoding context.
  3. Select Encode or Decode and inspect the plain-text result before copying or downloading it.

Limits and notes

Input can contain up to 1,000,000 UTF-16 code units. Local files must be valid UTF-8 and at most 4 MiB. Decoding performs one pass. Certain legacy references depend on context. Numeric encoding rejects characters that HTML would replace on decoding.

How your privacy works →

HTML Entity Encoder and Decoder: common questions

Can I encode an emoji as one numeric reference?

Select decimal or hex. The encoder works by Unicode code point, so 😀 becomes 😀 or 😀.

How does strict decoding handle a missing semicolon?

Require semicolons leaves an unterminated reference alone. Text and attribute rules follow the HTML parsing context.

Guides