Browser-only utility

Escape reserved HTML characters.

Convert common reserved characters into HTML entities suitable for inserting text into markup without interpreting it as tags.

Private browser workspace — input is processed on your device. Maximum input: 1,000,000 characters.

Initializing tool…

How it works

Use HTML Entity Encoder locally

The tool replaces ampersands, angle brackets, double quotes and apostrophes with named or numeric HTML entities, in the correct escape order.

Important limitations

HTML entity escaping is context-sensitive. This tool prepares general text and attributes; do not substitute it for safe URL, script or CSS escaping.

Processing runs on your device. Keep source content when exact formatting or compatibility matters.

Practical walkthrough

Show an HTML snippet as text

You need to paste an example HTML tag into a guide without its angle brackets being interpreted as markup.

Literal HTML example

<p title="demo">Tea & cake</p>

Expected behavior

The output escapes the angle brackets, quotation marks and ampersand so this snippet can be displayed as literal HTML text.

Check before using the output

HTML escaping is context-dependent. Escaped text is not a substitute for validating URLs, sanitizing untrusted HTML or escaping scripts.

Next step: Decode HTML entities.