HTML Entity Encoder/Decoder

Convert special characters to HTML entities and back. Supports named and numeric entities. 100% client-side.

Input: 0 chars • Output: 0 chars

Frequently Asked Questions

What is an HTML entity?

A special code used to display reserved characters that would otherwise be interpreted as HTML markup. For example, &lt; renders the < sign without triggering a tag, and &amp; displays an ampersand.

When should I encode HTML entities?

Always encode user-supplied content before injecting into HTML to prevent XSS. Also encode reserved characters (< > & " ') inside attribute values and text content.

What's the difference between named and numeric entities?

Named entities use labels like &copy; for ©. Numeric entities use the Unicode code point in decimal (&#169;) or hex (&#xA9;). Numeric entities work everywhere.

Does this tool handle emoji and non-Latin characters?

Yes. "All special chars" mode encodes every non-ASCII character using its full Unicode code point, including emoji and CJK text (with surrogate-pair handling).

Is my text uploaded anywhere?

No. Everything runs 100% client-side with vanilla JavaScript. Nothing is transmitted.

Related Tools You Might Like

Base64 Encoder Encode or decode strings and files to Base64 offline. Markdown ↔ HTML Convert Markdown to HTML and back, with GFM support. JSON Formatter Beautify, minify & validate JSON with error detection.