Paste HTML source or entity-encoded text: escape the six characters that break HTML text into character references, or decode references back into the characters they stand for. Both directions run in this page and nothing is uploaded.
Runs locally in your browserPaste markup or encoded text into the box. Escape HTML replaces the six characters that break HTML text (&, <, >, ", ' and the backtick) with character references; Unescape HTML turns character references back into the characters they stand for.
Both directions run inside this page: nothing is uploaded and the tool keeps working offline. The result panel shows exactly what Copy puts on the clipboard, and Clear empties the input and the result together.
Exactly six characters change: & becomes &, < becomes <, > becomes >, the double quote becomes ", the apostrophe becomes ' and the backtick becomes `. Accents, CJK text, emoji and line breaks are copied unchanged.
Escaping is not idempotent because the ampersand is part of every reference: escaping & produces &amp;. Run the escape once on the original text; to inspect an earlier result, use Unescape HTML on it first.
The page decodes character references the way a browser does: decimal and hexadecimal numeric references (', ', ©), named references such as , … or ©, and the legacy forms that are accepted without a semicolon, like & and <.
A name the browser does not know, such as &foo;, is left as written, and an invalid code point such as � becomes the replacement character U+FFFD. Legacy prefixes are decoded even without the semicolon, exactly as in HTML: ¬anentity; starts with ¬ and comes back as ¬anentity;. That is the browser's own behaviour, not a private table, so the page and a real parser agree.
Typical uses: showing code snippets in documentation, escaping user text before it is placed into an HTML template, and decoding entities that arrive from an API or an email. The output is plain text, so it pastes into any editor.
The tool does not validate or reformat HTML structure, does not decode URL percent-encoding (%20) and does not touch JavaScript or JSON escapes such as \n. Very large inputs are still processed in the page, so the highlighting may take a moment.