HTML entity encoder and decoder

Convert reserved characters to HTML entities or decode entity references back to text.

Encode text so it can be placed safely inside HTML, or decode entities back into readable characters. Processing stays in your browser.

Encode safely

The five characters with special meaning in HTML are replaced with named entities.

Decode with the browser

The browser’s own HTML parser resolves named and numeric character references.

Frequently asked questions

Does this sanitise untrusted HTML?

No. Encoding the entire string makes it display as text, but decoding untrusted content and inserting it as HTML is unsafe.

Are numeric entities supported?

Yes, the decoder accepts decimal and hexadecimal numeric character references.

Other free tools

Want the form to collect the answers too?

Hand-written HTML still needs somewhere to post to. formformform gives you the form, the hosting, the responses and the notifications — free while we are in early access.

Start free