HTML Entity Encoder & Decoder

Encode text into HTML entities (so <, & and friends display as characters instead of markup) or decode entities back into plain text. Handy for showing code, escaping user input, and fixing stray entities. Runs in your browser.

FAQ

What are HTML entities?

HTML entities are codes that represent characters which would otherwise be treated as markup or are hard to type — e.g. &lt; for <, &amp; for &. They let you display those characters as text.

When do I need to encode HTML?

Whenever you want to show < > & literally — displaying code samples, or safely inserting untrusted user input into HTML so it can't inject tags or scripts.

Named vs numeric entities?

Named entities like &amp; are readable; numeric ones like &#38; work for any character by code point. This tool encodes the core HTML characters by name and can encode all non-ASCII numerically.

Is my text uploaded?

No. Everything runs in your browser — nothing is sent, logged or stored.

More tools: URL encoder/decoder, Base64 encode/decode, and the full tools list.