Skip to content

How to Use HTML Entity Encoder / Decoder

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

  1. Choose Encode or Decode and paste the input.
  2. Enable Also encode non-ASCII characters if numeric entities are needed for those characters.
  3. 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.

Put this guide into practice

Explore HTML Tools · More practical guides

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help