This page is useful when pasted text needs to be shown literally inside markup instead of being interpreted as HTML. It helps with docs, code examples, CMS snippets, and quick copy review where characters like < or & should appear as text.
The current encoder is intentionally small. It escapes &, <, >, double quotes, and single quotes. It is not an HTML sanitizer and it does not analyze DOM structure or scripting risk.
The tool replaces those five special characters with HTML entities and leaves the rest of the string intact. That makes it good for literal display of text, but not for cleaning unsafe markup or transforming a whole document safely.
| Example | Value |
|---|---|
| Input | Text or markup-like content that should be displayed literally. |
| Output | A string where the main HTML special characters are replaced with entities. |
This page does not sanitize HTML, filter scripts, or validate whether a snippet is safe to embed. It is only an escape-html helper for a short text string.
No. It only escapes the main special characters.
The current page encodes ampersands, angle brackets, single quotes, and double quotes.
It is useful when text should appear literally inside HTML-facing content.
Encode the main HTML special characters as entities.