◆ DevToolbox

HTML Entity Encode / Decode

Escape and unescape HTML special characters.

Ad slot (AdSense)

About this tool

HTML entity encoding converts characters like <, >, & and quotes into their safe entity equivalents so they display as text instead of being parsed as markup. This is essential for preventing broken layouts and XSS when showing user content. Everything runs locally.

FAQ

Why escape HTML?

To display characters like < and > as text and to prevent user input from injecting markup or scripts (XSS).

Which characters get encoded?

The five key ones: &, <, >, double quote and single quote. Decoding handles all named and numeric entities.