Encode text to HTML entities or decode entities back to readable characters. Free online HTML entity encoder and decoder for safe markup and escaping.
About this tool
Escape text as HTML entities or decode entities into readable characters.
How to use HTML Entity Encoder / Decoder
- Choose Encode or Decode and paste the input.
- Enable Also encode non-ASCII characters if numeric entities are needed for those characters.
- Copy Result or use Swap to reverse the conversion.
Worked example
Encode <b> so the tag can be displayed as text rather than interpreted as markup.
Does this sanitize arbitrary HTML safely?
It is an encoding utility, not a full HTML sanitizer. The correct escaping depends on the output context.
Should I encode text twice?
Usually not. Double encoding can turn an ampersand in an existing entity into another entity. Inspect the result.
Explore HTML Tools · More practical guides