HTML Entity Encoder

Escape text so it can be shown safely inside HTML — code samples, user content, attributes.

● Your files are processed locally in your browser and are not uploaded to our servers.

How it works

The five characters with a special meaning in HTML (& < > " ') are always escaped. Optionally, accented letters, emoji and other non-ASCII characters are converted to named or numeric entities, which is useful for legacy systems that don't handle UTF-8.

FAQ

Is escaping enough to prevent XSS?

Escaping text inserted into HTML content and quoted attributes is the core defense, but URLs, JavaScript and CSS contexts need their own encoding.