How to escape characters as HTML entities
Display a tag as text in documentation. Entity conversion is not a substitute for sanitising untrusted HTML before rendering it.
Steps
Paste the input into the form and choose a mode if one is offered. Check the result before copying or saving it.
Example
<b> → <b>& → &What to check
Escape angle brackets and ampersands to show them as text. Entity escaping does not replace checking allowed markup or using the correct escaping for another context.
Common tasks and examples
Start with a small sample. Compare the structure before and after a format conversion, or check that only the intended characters changed in a text operation.
" → "© → ©a & b → a & b
Task reference
- Encode
- Settings: Input: <b> · What to expect: <b>
- Encode
- Settings: Input: a & b · What to expect: a & b
- Decode
- Settings: Input: <b> · What to expect: <b>
- Decode
- Settings: Input: " · What to expect: "
- Decode
- Settings: Input: © · What to expect: ©