HTML Entity Encode/Decode
Convert between plain text and HTML entities (< > & etc.) in real time. Encode turns special characters into entities; decode restores them. Input and output use text fields with file load and copy support.
HTML Entity Input
HTML Entity Output
Read Only
How to use
About this tool
Converts between plain text and HTML entities (< > & etc.) in real time.
How to use
Choose Encode or Decode, enter text or load a file; the output updates in real time. Use the copy button to copy the result.
Options
■ Convertible named entities
| Entity | Character |
|---|---|
| < | < |
| > | > |
| & | & |
| " | " |
| ' | ' |
| © | © |
| ® | ® |
| ™ | ™ |
| | (NBSP) |
| — | — |
| – | – |
| … | … |
| • | • |
| → | → |
| ← | ← |
| ↑ | ↑ |
| ↓ | ↓ |
| € | € |
| £ | £ |
| ¥ | ¥ |
| ¢ | ¢ |
| ° | ° |
| ± | ± |
| × | × |
| ÷ | ÷ |
| ½ | ½ |
| ¼ | ¼ |
| ¾ | ¾ |
| ⅛ | ⅛ |
| ⅜ | ⅜ |
| ⅝ | ⅝ |
| ⅞ | ⅞ |
| « | « |
| » | » |
| ‹ | ‹ |
| › | › |
| † | † |
| ‡ | ‡ |
| ‰ | ‰ |
| ∞ | ∞ |
| ∑ | ∑ |
| ∏ | ∏ |
| √ | √ |
| ≠ | ≠ |
| ≤ | ≤ |
| ≥ | ≥ |
| · | · |
| ♠ | ♠ |
| ♣ | ♣ |
| ♥ | ♥ |
| ♦ | ♦ |
| α | α |
| β | β |
| γ | γ |
| δ | δ |
| ε | ε |
| θ | θ |
| λ | λ |
| μ | μ |
| π | π |
| σ | σ |
| ω | ω |
| Α | Α |
| Β | Β |
| Γ | Γ |
| Δ | Δ |
| Θ | Θ |
| Λ | Λ |
| Π | Π |
| Σ | Σ |
| Ω | Ω |
Numeric references (&#decimal; &#xhex;) are also decoded.
Use cases
• Escaping HTML for safe display or embedding • Restoring entity notation to plain characters for editing • Handling special characters in logs or messages
FAQ
- Q: What is an HTML entity?
- A: HTML entities are special character sequences used to represent characters that have special meaning in HTML or that are difficult to type. For example, < is written as <, & as &, and © as ©.
- Q: When should I encode HTML entities?
- A: Always encode user-supplied content before inserting it into HTML to prevent XSS (Cross-Site Scripting) attacks. Also encode when embedding special characters in HTML attributes or text nodes.
- Q: What is the difference between named and numeric entities?
- A: Named entities use human-readable names (e.g. &copy; for ©). Numeric entities use decimal (e.g. ©) or hexadecimal (e.g. ©) code points. Both represent the same character; named entities are easier to read.
- Q: Does decoding also handle numeric entities like ©?
- A: Yes. The tool decodes both named entities (©) and numeric entities (© and ©) in Decode mode.
- Q: Does this tool send my data to a server?
- A: No. All encoding and decoding is performed in the browser. Your data is never sent to any server.
