HTML entity escaper
Escape and unescape HTML entities so markup can be shown as text.
Loading tool…
About the html entity escaper
Escapes the five characters that break HTML markup — ampersand, angle brackets and both quote styles — and reverses the process using the browser's own entity table, so named entities and numeric references both decode correctly.
Frequently asked questions
Does escaping prevent cross-site scripting?
It handles the common case of untrusted text inside an element or attribute. Content going into script blocks, style blocks or URL attributes needs its own contextual encoding — escaping alone is not sufficient there.
Do I need to escape accented characters?
Not in a UTF-8 document. Entities for é and similar are a legacy of older encodings; leaving the real character is more readable and equally valid today.