HTML Entity Encoder / Decoder
Encode plain text to HTML entities or decode HTML entities back to readable text. Runs entirely in your browser — no data leaves your device.
Input
Output
About HTML Entity Encoding
HTML entities are special sequences that represent characters which have special meaning in HTML, or characters that cannot easily be typed. For example, the less-than sign (<) must be written as < inside HTML content, otherwise the browser interprets it as the start of a tag.
When to encode
- When displaying user-generated content to prevent Cross-Site Scripting (XSS) attacks.
- When embedding code samples or HTML snippets inside a web page.
- When your content contains characters like
&,<,>, or".
When to decode
- When you receive HTML-encoded text from an API or CMS and need the raw characters.
- When copy-pasting HTML source and need to read the actual text content.
Privacy
All encoding and decoding runs locally in your browser. Nothing is uploaded to a server.