About the HTML Entity Encoder / Decoder
Convert special characters to HTML entities (< → <) or decode entities back to plain characters. Essential for displaying code samples on web pages and preventing markup injection.
Handles named entities, numeric references and all Unicode characters.
How to use the HTML Entity Encoder / Decoder
- Paste your text or HTML.
- Click "Encode" to escape special characters, or "Decode" to reverse.
- Copy the result.
Common uses
Displaying code snippets on web pages
Sanitizing user text for HTML output
Decoding scraped or exported content
Frequently asked questions
Which characters must be escaped in HTML?
At minimum & < and >; also quotes inside attribute values (", ').
What is the difference between named and numeric entities?
Named entities use mnemonics (&), numeric use code points (&) — both render identically.
Related tools
JSON Formatter & Validator
Beautify, validate and minify JSON with clear error locations.
Developer ToolsUUID Generator
Generate cryptographically secure UUID v4 identifiers, in bulk.
Developer ToolsRegex Tester
Test regular expressions live with match highlighting and a cheat sheet.
Developer ToolsMarkdown Editor & Preview
Write Markdown with a live side-by-side HTML preview.
Developer Tools