What this does
Converts characters to HTML entities and back. Encoding makes text safe to place inside HTML or XML: <, >, & and quotes become<, >, &, ". Decoding turns entities such as é, é andé back into the characters they stand for.
Encoding modes
- Only special characters escapes
& < > " '. This is what you want for safely embedding text in HTML; apostrophes use'because'is not valid in HTML 4. - Special and non-ASCII also converts every character above U+007F, using a named entity when one exists (
©,€) and a numeric one otherwise. The result is pure ASCII. - Every character turns all characters except line breaks into numeric references, which is useful for obfuscation tests and for checking how a parser treats entities.
Decoding behavior
Decimal (©) and hexadecimal (©) references are decoded for any code point, including emoji. Named references are resolved with the browser's own HTML parser, so the full HTML5 set (about 2,200 names such as✓) works. Named references need the trailing semicolon. Numbers 128-159 are mapped the way browsers do (Windows-1252), and impossible code points become U+FFFD. Unknown names are left untouched rather than guessed at. Decoding runs once, so&lt; becomes <.
Example
<a href="/?q=café"> encodes to<a href="/?q=café">, or with non-ASCII encoding on,<a href="/?q=café">.
Privacy
Everything runs in your browser. Nothing you paste is uploaded or stored.