How to use this tool
- Paste plain text or HTML entities into the input field.
- Choose Encode or Decode to run the conversion.
- Copy the result, swap input/output, or clear to start over.
About HTML Entity Encoder Decoder
This tool helps you convert between plain text and HTML entities when preparing content for web display or parsing entity-encoded strings. It supports common named entities and decimal or hex numeric references.
Common use cases
- Escaping special characters before inserting text into HTML
- Decoding entity-encoded content from APIs or scraped pages
- Converting numeric character references for debugging or migration
FAQ
- What does HTML entity encoding do?
- Entity encoding replaces characters like <, >, &, and quotes with safe sequences such as <, >, and & so they display correctly in HTML without being interpreted as markup.
- Does this tool sanitize or prevent XSS?
- No. Encoding a few characters is not full sanitization. For user input, use a proper sanitization library and context-aware escaping (HTML, JS, URL) to prevent XSS.
- Can I decode decimal and hex numeric entities?
- Yes. The tool decodes { (decimal) and { (hex) style entities, plus common named entities like & and .
- Why are some entities left unchanged when decoding?
- Unknown named entities are left as-is. Ensure entities use correct names and end with a semicolon; ambiguous ampersands without semicolons are not decoded.