HTML Encoder & Decoder
Escape text for HTML or turn character references back into readable text without rendering the result as markup.
A QUICK WALKTHROUGH
How to use this tool
- Paste text or HTML character references up to 100,000 characters.
- Choose Encode or Decode, then select the range, entity style, or semicolon rule you need.
- Convert, review the plain-text result, and copy it.
Explicit encoding choices
Special-character mode encodes ampersand, angle brackets, double quotes, and apostrophes. The broader mode also encodes every non-ASCII Unicode code point. Choose HTML5 named references when available, decimal numeric references, or hexadecimal numeric references.
HTML5 decoding without rendering
The decoder recognizes HTML5 named references plus decimal and hexadecimal numeric references. Strict mode requires semicolons; browser-body mode also accepts the legacy semicolon-less references recognized in HTML text. Unknown references stay unchanged. The decoded result is shown as text and is never inserted as live HTML.
GOOD TO KNOW
Common questions
Does encoding sanitize arbitrary HTML?
It escapes text for HTML text content and quoted attribute values. It is not a complete sanitizer for URLs, CSS, JavaScript, or already-structured markup.
What happens to an unknown entity?
It remains unchanged, so you can see and correct it rather than losing text.
Why can browser-compatible decoding work without a semicolon?
HTML permits a limited legacy set of named references without semicolons in text. Use strict mode when you require explicit, unambiguous references.