Skip to main
Table of Contents

HTML Character Escaper

Use the tool below to convert raw HTML into entity-safe text for code samples and documentation.

Editor

Paste raw HTML, partially escaped HTML, or plain text, then choose whether to escape it or convert supported entities back to their original characters.

Escaped Code

Escaped <html> code here

Double escaping will present the code as HTML entities rather than rendered code.

Displayed Code

Displayed <html> code here

Details

This tool is useful when preparing snippets for documentation, examples, blog posts, or CMS content.

Use Escaped Code when you want the literal entity output, and Displayed Code when you want to confirm how that escaped result will appear when shown as code.

What It Escapes

This example currently escapes these characters and can also reverse them with the Unescape button.

CharacterEscaped Entity
&&amp;
<&lt;
>&gt;
"&quot;
'&#39;
/&#x2F;
@&#64;

The displayed output renders the escaped result as visible code text, which makes it easier to sanity-check snippet output before using it elsewhere.

Attribution