About HTML Encoder
Encodes and decodes HTML entities with three encoding modes. Basic mode converts the five critical characters (&, <, >, single quote, double quote) that break HTML parsing. All mode maps 30+ characters to their named entities, including currency symbols, arrows, and typographic marks. Numeric mode produces decimal character references for any character above U+00A0, providing maximum compatibility across systems that may not support named entities.
- Basic encoding covers & < > " '—the minimum for safe HTML output
- All mode maps 30+ characters to named entities: currency (€, £, ¥), arrows (←→↑↓), symbols (©, ®, ™)
- Numeric mode uses charCodeAt to produce &#NNN; for any character above U+00A0
- Decoder validates output for unmatched tags, unencoded ampersands, and script tag presence
- Includes a quick-reference table of 12 common entities with click-to-copy
Frequently Asked Questions
- Which encoding mode should I use?
- Basic for most web output—it handles the characters that break HTML parsing. Use All when your text contains currency symbols, arrows, or special punctuation. Numeric is for maximum compatibility with systems that don’t support named entities.
- When should I encode HTML entities versus use CDATA sections?
- HTML entities are the standard for web pages and HTML emails. CDATA sections are only valid in XML and XHTML, not in HTML5. For web output, always use entity encoding. For RSS feeds or XML APIs, either approach works but entities are more portable.
More Web Tools Tools
All Web Tools toolsWeb Tools
Base64 Encoder Decoder
Encode and decode Base64 strings.
Web Tools
Image to Base64 Converter
Convert images to Base64 data URLs for direct embedding in HTML, CSS, or JSON.
Web Tools
HTTP Status Code Checker
Check any URL's HTTP status code and headers.
Web Tools
Color Accessibility Checker
Check if color combinations meet WCAG contrast requirements.