HTML Entity Encoder / Decoder
Escape or unescape HTML entities safely
HTML has exactly five characters that mean something to the parser rather than to the reader, and this tool converts all of them. Encoding turns the ampersand into &, and then the less-than, greater-than, double quote and apostrophe into their entities, in that order so the ampersand substitution cannot corrupt the others. The result is safe to drop into markup as body text or inside a quoted attribute value. Decoding runs the input through the browser's own HTML parser and reads back the text, which means it resolves every named entity in the specification plus numeric ones such as — or —, not just the five. The two operations are not interchangeable with percent-encoding for URLs, and they are not a substitute for output encoding at the point where untrusted data is inserted.
Convert special characters like <, >, & and quotes to safe HTML entities, or decode entities back to plain text. Essential for embedding code in HTML and debugging encoding issues.
Private HTML Entity Encoder / Decoder In Your Browser
HTML Entity Encoder / Decoder is processed locally with client-side JavaScript. Your files never touch a server, and there is no queue to wait in.
How to use HTML Entity Encoder / Decoder
Open the Encode tab and paste markup or prose into the Plain input box.
Take the escaped output from the result panel and place it where literal angle brackets would otherwise be parsed.
Switch to Decode and supply text containing entities, numeric or named.
Read back the plain characters, remembering that any real tags in the input are consumed rather than printed.
- Encodes the complete set of five HTML-significant characters, ampersand first
- Decoding resolves every named and numeric entity the browser's parser recognises
- Apostrophes encoded as the numeric ' form rather than a named entity
- Amphibious: same tab switch serves both escaping and unescaping
- A developer embedding a code sample inside a paragraph without the browser treating the tags as markup.
- A support engineer reading a report that shows " and & everywhere and needs the readable version.
- A student checking which characters must be escaped before a string is placed in a quoted HTML attribute.