HTML Entity Encoder / Decoder
Escape or unescape HTML entities like &.
Free
Runs in your browser
Common entities
| Character | Named | Numeric | Description |
|---|
About this tool
HTML Entity Encoder escapes characters such as <, > and & so they show as text in a web page instead of being read as markup. The decoder turns entities back into plain characters.
How to use HTML Entity Encoder / Decoder
- Paste your text or HTML.
- Pick an encoding mode.
- Press “Encode” or “Decode” and copy the result.
Questions people ask
Which characters must be escaped in HTML?
In text, & and < must be escaped. Inside attribute values, also escape the quote character you use. Escaping > is optional but common.
Named or numeric entities?
Both work in all browsers. Named entities like © are easier to read, while numeric ones like © work for every Unicode character.
Does encoding protect against XSS?
Escaping text before inserting it into HTML is one part of XSS protection, but attributes, URLs and scripts need their own escaping rules.
More developer tools
See all 24 →
User Agent ParserSee your browser, OS and device from a user agent.
Screen Resolution CheckerCheck your screen size, viewport and pixel ratio.
HTTP Status CodesSearchable list of HTTP status codes and meanings.
JSON FormatterBeautify, minify and validate JSON with error lines.
Base64 Encode / DecodeEncode text to Base64 or decode it back, with UTF-8.
URL Encode / DecodePercent-encode or decode URLs and query strings.