UTF-8:
${utf8Output.replace('UTF-8: ', '')}
`; const fullContent = header + content + footer;// Create a Blob with the Word content const blob = new Blob([fullContent], { type: 'application/msword' });// Trigger download const link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = 'hex_to_utf8_output.doc'; link.click();// Clean up URL.revokeObjectURL(link.href); }function copyToClipboard() { const utf8Output = document.getElementById('utf8-output').textContent;if (utf8Output === 'UTF-8:') { alert('No output to copy! Convert a Hexadecimal value first.'); return; }navigator.clipboard.writeText(utf8Output.replace('UTF-8: ', '')).then(() => { alert('Output copied to clipboard!'); }).catch(err => { alert('Failed to copy: ' + err); }); }function resetFields() { // Reset the textarea and output document.getElementById('hex-input').value = ''; document.getElementById('utf8-output').textContent = 'UTF-8:'; }