HTML Entity Encoder / Decoder
Encode plain text to HTML entities or decode entities back to readable text — named, decimal, and hex formats all supported.
Format:
Input Text
Encode:
Encoded Output
0
Converted
0
Input chars
0
Output chars
Common HTML Entity Reference
| Char | Named | Decimal | Hex |
|---|
Copied!
Summary
Encode plain text to HTML entities or decode entities back to readable text — named, decimal, and hex formats all supported.
How it works
- Paste or type your text into the input panel.
- Select Encode to convert characters into entities, or Decode to reverse the process.
- For encoding, choose the output format: Named (&), Decimal (&), or Hex (&).
- Toggle which characters to encode: HTML specials only, non-ASCII, or all printable ASCII.
- Copy the result or use Swap to pipe output back as input for chained operations.
Use cases
- Safely embed user-generated content inside HTML to prevent XSS.
- Encode angle brackets and ampersands before inserting text into HTML templates.
- Decode entity-escaped text from a database or CMS export before processing.
- Convert accented characters to portable numeric entities for legacy ASCII HTML.
- Debug double-encoded entities by decoding twice using the Swap button.
- Prepare multilingual content for HTML email clients with limited charset support.
- Obfuscate email addresses in HTML source by encoding each character.
- Verify encode/decode round-trips without data loss.
Frequently Asked Questions
Last updated: 2026-06-09 ·
Reviewed by Nham Vu