HTML Entities Encoder/Decoder

Encode and decode HTML special characters. Convert HTML entities to text and back with this free online tool.

"', 'Encode: "Price: $100" → "Price: $100" (no change, no special chars)', 'Decode: "'single'" → "single"', 'Encode: "

Paragraph

" → "<p>Paragraph</p>"', 'Decode: "  indented" → " indented"', 'Encode: "A & B & C" → "A & B & C"', 'Decode: "<a href="url">link</a>" → "link"', 'Encode: "1/2 < 3/4" → "1/2 < 3/4"', 'Decode: "© 2024" → "© 2024"', 'Encode: "Café & résumé" → "Café & résumé"', 'Decode: "® trademark" → "® trademark"', 'Encode: "x > y > z" → "x > y > z"', 'Decode: "<input>" → "" (numeric entities)', 'Encode: "Tom & Jerry" → "Tom & Jerry"', 'Decode: "é → é (named entity)', 'Encode: "" → "<img src="x">"', 'Decode: "ABC" → "ABC" (numeric decimal)', 'Encode: "a && b" → "a && b"', 'Decode: "ABC" → "ABC" (numeric hex)' ]; var count = 0; function generate() { var sel = parseInt(document.getElementById('count').value); var lvl = document.getElementById('level').value; var input = document.getElementById('input').value.trim(); var results = []; for (var i = 0; i < sel; i++) { var t = templates[i % templates.length]; if (input && t.indexOf('{{input}}') !== -1) t = t.replace(/\{\{input\}\}/g, input); results.push(t); } document.getElementById('resultText').textContent = results.join('\n'); document.getElementById('output').style.display = 'block'; } function copyText() { navigator.clipboard.writeText(document.getElementById('resultText').textContent); }