Home › Dev & Data › HTML Encode
Dev & Data
HTML Encode
Escape the characters that break HTML — &, <, > and " — into their entity form so text renders literally instead of as markup.
Try it now
Worked example
<div class="x">hi</div>
Learn the method
Frequently asked
Why escape HTML?
To display code or user text safely without it being parsed as tags.
Which entities?
& < > and ".