HTML Entity Encoder & Decoder
Safely escape `<`, `>`, `&`, and quotes for HTML templates and code blocks, or unescape `&` / `&#x...;` entities back into plain text locally.
Processed locally · 0 bytes uploaded
Input HTML / Text
Result
Essential HTML Entities Reference
| Character | Named Entity | Hex Entity | Why Escape It |
|---|---|---|---|
& | & | & | Prevents bare ampersands from starting unintended entities |
< | < | < | Stops user text or code examples from opening HTML/script tags |
> | > | > | Closes angle-bracket pairs cleanly inside <pre><code> |
" | " | " | Prevents breaking double-quoted HTML attribute values |
' | ' | ' | Protects single-quoted HTML attributes |
Specs
- Supported formats
- Input & Output: Raw HTML/text ↔ Named (&, <) or numeric (&#x...;) HTML entities
- File & batch limits
- Text snippets and templates up to several MB convert immediately in browser RAM
- AI model download
- None (0 MB — zero external dependencies)
- Browsers & devices
- All modern desktop & mobile browsers
- Offline support
- Yes — works 100% offline once loaded
FAQ
When should I check 'Encode non-ASCII as &#x...;'?
Enable it when embedding emoji, smart quotes, or CJK text into legacy email templates or ASCII-only XML/HTML feeds.
Is decoding untrusted HTML entities safe here?
Yes. Decoded output is written exclusively to a plain-text <textarea> value and never injected as executable DOM.