HTML Entity Encoder & Decoder
Encode text to HTML entities (&, <, &) or decode entities back to characters. Named, decimal, and hex styles. Free online HTML escape tool.
Mode
Entity style
Encoded
Frequently asked questions
Which characters must be escaped in HTML?
At minimum & < > in text, plus " or ' inside attribute values.
Named or numeric entities?
Named entities like © are readable; numeric ones like © work for every Unicode character.
Does this prevent XSS?
Escaping output is one part of preventing cross-site scripting, but frameworks and context-aware escaping on the server are the real defense.