Loading tool…
How to Encode and Decode HTML Entities
The HTML Entity tool converts special characters to their HTML entity equivalents (and back) — essential for safely embedding text in HTML documents.
- Paste text containing special characters (like <, >, &, or quotes).
- Click Encode to convert to HTML entities, or Decode to convert back to plain characters.
- Copy the result for use in your HTML source code.
What Are HTML Entities?
HTML entities represent reserved characters that have special meaning in HTML. For example, < must be written as < to avoid being interpreted as a tag. Without proper encoding, user-generated content can break page layout or enable XSS (cross-site scripting) attacks. Common entities include & (&), < (<), > (>), " ("), and ' (').
Why Use Our HTML Entity Tool?
- Bidirectional — encode to entities or decode back to characters.
- Named and numeric — supports both & and & formats.
- XSS prevention — properly escape user input before embedding in HTML.
- No server — runs entirely in your browser.
Frequently Asked Questions
Why do I need to encode HTML entities?
Characters like < and > have special meaning in HTML. Without encoding, they can break your markup or create security vulnerabilities (XSS attacks).
What is the difference between named and numeric entities?
Named entities use a mnemonic (& for &). Numeric entities use the Unicode code point (& or &). Both render the same character.
Does this tool handle all Unicode characters?
Yes. Any character can be represented as a numeric entity (&#nnnn;), and the tool handles the full Unicode range.
Is my text private?
Yes. Processing happens entirely in your browser.