FREE ONLINE TOOL

HTML Entity Encoder

Encode HTML-sensitive characters for safer text display.

How this tool works

HTML entities represent special characters in markup so they can be displayed as text rather than interpreted as part of HTML syntax. This tool encodes common HTML-sensitive characters and can decode entity-encoded text.

How to use it

  1. Paste text into the input area.
  2. Select Encode to convert characters such as ampersands, angle brackets and quotes.
  3. To reverse a compatible encoded string, paste it and choose Decode.

Example and practical tips

The text “<b>” can be encoded as “&lt;b&gt;” so the angle brackets are represented as text characters.

Encoding is context-dependent. This basic tool handles common characters but is not a complete security sanitizer for every HTML, JavaScript, CSS or URL context. Use appropriate escaping for the context where the text will be inserted.

Frequently asked questions

Does encoding make all HTML safe?

No. It handles common HTML-sensitive characters but is not a complete sanitizer for every context.

Can I decode an entity?

Yes. Use Decode on compatible entity-encoded text to recover its character representation.