HTML Entities — Escape Characters Online

Encode special HTML characters.

Encode
Decode
Raw
Entities
<p class="hi">Hello & welcome — "world"!</p>

An HTML entities converter encodes and decodes special characters so they can be safely embedded in markup. To keep "<" from being read as the start of a tag, it's written as &lt;; likewise &gt; stands for ">", &amp; for "&", and &quot; for a quotation mark.

Encoding is needed whenever HTML needs to display code itself or characters that would otherwise break the markup — for example, showing a sample tag inside an article. It's also a basic defense against XSS: user-submitted text gets escaped so that an entered "<script>" renders as plain text instead of executing. Decoding does the reverse, turning entities back into ordinary characters.

The tool handles both named (&lt;) and numeric (&#60;) entities, and supports non-Latin text and Unicode. Everything runs right in your browser, and your data is never sent anywhere.

Frequently asked questions

At minimum: & < > " '. That's enough to safely embed text in HTML and avoid XSS.
A way to write a character by its Unicode code point: &#65; (decimal) or &#x41; (hexadecimal) both produce "A". This lets you insert any Unicode character, even emoji (&#x1F600; → 😀).
Base64 is for binary data. HTML entities are only for replacing characters that are dangerous in HTML with safe text references — the text itself stays readable.