Unicode & Text Authority
TEXT REFERENCE / TOOLS

HTML entity encoder and decoder

Encode text as HTML character references or decode references back to plain text.

How it works

Escape markup punctuation, encode every code point as decimal or hexadecimal references, or decode references once. Decoding requires a semicolon and supports numeric references and 23 case-sensitive named references. Unknown names and malformed references stay unchanged; invalid numeric references stop conversion. Controls other than tab, LF and form feed, and noncharacters are rejected. This is not a full HTML parser or sanitizer; decoded markup remains text and is never executed here.

Copy conversion summary

Use Copy HTML entity conversion summary to copy the displayed output code-point count as tab-separated Metric and Value columns, without copying the text itself. For example, decimal encoding of Aé😀 gives Aé😀 (20 output code points); decoding those references gives 3 output code points. Empty valid results count as zero.

Hexadecimal letter case

In Hexadecimal references mode, select Lowercase to write é or 😀 instead of é or 😀. Both forms represent the same code points. The setting applies only to hexadecimal encoding; decimal references, escaping and decoding remain unchanged.

Supported references

Named references (case-sensitive): amp, lt, gt, quot, apos, nbsp, copy, reg, trade, deg, euro, pound, yen, cent, times, divide, plusmn, hellip, mdash, ndash, bull, eacute, ntilde.

For example, °, ° and ° all decode to °. < decodes to < in one pass. Input is limited to 8,000 UTF-16 units. Encoded results may be longer than the decoder accepts; split long results into complete references before decoding. Browser text fields normalize line endings to LF. Do not paste decoded output into an HTML execution context without appropriate escaping.

See degree sign reference and WHATWG named character references for the full standard, which has broader coverage than this tool.

Other tools

Text utilities

Encoding and conversion

Typography

Character and case tools