HTML Entity Encoder & Decoder

Convert text to HTML entities or decode HTML entities back to plain text, instantly.

How to use this tool

Choose Encode or Decode, then type or paste your text — the output updates live.

About this tool

Encoding converts &, <, >, ", and ' into their named HTML entities. Decoding uses the browser's own HTML text-node parsing (not innerHTML execution) to safely turn entities back into plain text, so no script can run.

100% client-side. Nothing you type is uploaded, logged, or stored.

Frequently asked questions

Why encode special characters as HTML entities?

Characters like < and & have special meaning in HTML. If you want to display them as literal text (e.g. showing a code snippet, or user-submitted text that might contain them), they must be encoded as entities so the browser doesn't interpret them as markup.

Is decoding safe from malicious input?

Yes, for viewing decoded text on this page. Decoding uses the browser's own text-node parsing, not innerHTML execution, so no script can run. However, never insert decoded HTML entity output back into a page as raw HTML without separately sanitizing it first.