Word to PDF Converter

Convert Word documents to PDF online free. No registration, no watermark, 100% secure. Trusted by 25,000+ users.

45,892+ PDFs Created
4.7/5 Rating
100% Secure

Drop your Word file here

or click to browse

Files are processed locally - 100% secure

How to Convert Word to PDF?

1

Upload Word File

Click or drag & drop your DOC or DOCX file

2

Click Convert

We'll convert your file to PDF instantly

3

Download PDF

Save your converted PDF file

100% Secure

Files are processed locally in your browser. Never uploaded to any server.

Lightning Fast

Convert documents in seconds with our optimized engine.

No Registration

No signup, no email required. Start converting immediately.

No Watermark

Clean PDF files without any watermarks or ads.

Frequently Asked Questions

How to convert Word to PDF online?

Simply upload your Word document, click the "Convert to PDF" button, and download your PDF file. It takes only seconds and is completely free.

Is this Word to PDF converter really free?

Yes, it's 100% free with no hidden charges. You can convert unlimited Word documents without any registration or watermark.

Is it safe to upload my documents?

Absolutely! All conversion happens locally in your browser. Your files are never uploaded to any server, ensuring complete privacy and security.

What Word formats are supported?

We support both .DOC and .DOCX formats. Any Microsoft Word document can be converted to PDF.

Popular PDF Tools

`; progressBar.style.width = '70%'; progressPercentage.textContent = '70%'; // Create PDF using jsPDF await createPdfWithJsPDF(styledHtml, selectedFile.name); progressBar.style.width = '90%'; progressPercentage.textContent = '90%'; // Show preview await showPdfPreview(); progressBar.style.width = '100%'; progressPercentage.textContent = '100%'; setTimeout(() => { progressSection.classList.add('hidden'); }, 500); showToast('Conversion complete!', 'success'); } catch(error) { console.error('Conversion error:', error); if (selectedFile && selectedFile.name.endsWith('.doc')) { showToast('Old .doc format is not supported. Please save it as .docx first and try again.', 'error'); } else { showToast('Error converting file. Please ensure it is a valid .docx file.', 'error'); } progressSection.classList.add('hidden'); } } // Create PDF using jsPDF async function createPdfWithJsPDF(html, filename) { return new Promise((resolve, reject) => { try { // Create a hidden offscreen iframe for printing with exact A4 viewport dimensions (794px width at 96 DPI) const iframe = document.createElement('iframe'); iframe.style.position = 'absolute'; iframe.style.width = '794px'; iframe.style.height = '1123px'; iframe.style.left = '-9999px'; iframe.style.top = '-9999px'; iframe.style.border = 'none'; document.body.appendChild(iframe); const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; iframeDoc.open(); iframeDoc.write(html); iframeDoc.close(); // Run immediately after close (using a short timeout to let rendering settle) setTimeout(() => { try { const element = iframeDoc.body; const opt = { margin: 0, filename: filename.replace(/\.[^/.]+$/, '') + '.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, letterRendering: true, allowTaint: false, useCORS: true, width: 794 }, jsPDF: { unit: 'pt', format: 'a4', orientation: 'portrait' } }; html2pdf().from(element).set(opt).toPdf().get('pdf').then(function(pdf) { // Convert PDF to blob const pdfBlob = pdf.output('blob'); convertedPdfBlob = pdfBlob; // Create download URL if(convertedPdfUrl) { URL.revokeObjectURL(convertedPdfUrl); } convertedPdfUrl = URL.createObjectURL(pdfBlob); // Show download button downloadBtn.classList.remove('hidden'); // Set download link downloadBtn.onclick = function() { const a = document.createElement('a'); a.href = convertedPdfUrl; a.download = filename.replace(/\.[^/.]+$/, '') + '.pdf'; a.click(); showToast('Download started!', 'success'); }; // Remove iframe document.body.removeChild(iframe); resolve(); }).catch(function(error) { console.error('PDF generation error:', error); document.body.removeChild(iframe); // Fallback: Create simple PDF createSimplePdf(filename).then(resolve).catch(reject); }); } catch(error) { console.error('Iframe processing error:', error); document.body.removeChild(iframe); // Fallback createSimplePdf(filename).then(resolve).catch(reject); } }, 200); } catch(error) { console.error('PDF creation error:', error); // Fallback method createSimplePdf(filename).then(resolve).catch(reject); } }); } // Fallback: Create simple PDF using html2pdf async function createSimplePdf(filename) { return new Promise((resolve) => { const element = document.createElement('div'); element.innerHTML = `

Word to PDF Conversion Fallback

File: ${filename}

Converted on: ${new Date().toLocaleString()}


This is a simplified conversion layout fallback. For rich formatting, please ensure your Word document is in a standard DOCX layout.

`; const opt = { margin: 0.75, filename: filename.replace(/\.[^/.]+$/, '') + '.pdf', image: { type: 'jpeg', quality: 0.95 }, html2canvas: { scale: 2 }, jsPDF: { format: 'a4', orientation: 'portrait' } }; html2pdf().from(element).set(opt).toPdf().get('pdf').then(function(pdf) { const pdfBlob = pdf.output('blob'); convertedPdfBlob = pdfBlob; if(convertedPdfUrl) { URL.revokeObjectURL(convertedPdfUrl); } convertedPdfUrl = URL.createObjectURL(pdfBlob); downloadBtn.classList.remove('hidden'); downloadBtn.onclick = function() { const a = document.createElement('a'); a.href = convertedPdfUrl; a.download = filename.replace(/\.[^/.]+$/, '') + '.pdf'; a.click(); showToast('Download started!', 'success'); }; resolve(); }).catch(function(err) { console.error('Fallback PDF generation error:', err); resolve(); }); }); } // Extract plain text from legacy binary .doc format using compound file binary scanner function extractTextFromDocBinary(arrayBuffer) { const view = new DataView(arrayBuffer); const len = arrayBuffer.byteLength; let text = ""; // Scan for UTF-16LE characters (2 bytes) let unicodeBuffer = ""; for (let i = 0; i < len - 1; i += 2) { const charCode = view.getUint16(i, true); // Standard printable character ranges, tabs, newlines, Hindi/Devanagari (0x0900-0x097F) if ((charCode >= 32 && charCode <= 126) || charCode === 9 || charCode === 10 || charCode === 13 || (charCode >= 160 && charCode <= 255) || (charCode >= 0x0900 && charCode <= 0x097F)) { unicodeBuffer += String.fromCharCode(charCode); } else { if (unicodeBuffer.length >= 8) { text += unicodeBuffer + "\n"; } unicodeBuffer = ""; } } if (unicodeBuffer.length >= 8) { text += unicodeBuffer + "\n"; } // Fallback to 1-byte ANSI/ASCII scan if (text.trim().length < 50) { let ansiBuffer = ""; for (let i = 0; i < len; i++) { const byte = view.getUint8(i); if ((byte >= 32 && byte <= 126) || byte === 9 || byte === 10 || byte === 13) { ansiBuffer += String.fromCharCode(byte); } else { if (ansiBuffer.length >= 8) { text += ansiBuffer + "\n"; } ansiBuffer = ""; } } if (ansiBuffer.length >= 8) { text += ansiBuffer + "\n"; } } const lines = text.split('\n'); const cleanLines = []; // Comprehensive list of Microsoft Word binary formatting keywords to filter out const junkKeywords = [ 'normal.dot', 'microsoft', 'word.document', 'msworddoc', 'content-type', 'xml', 'font', 'style', 'margin', 'padding', 'width', 'height', 'border', 'heading', 'table', 'theme', 'settings', 'properties', 'template', 'times new', 'calibri', 'arial', 'courier', 'wingdings', 'symbol', 'default', 'paragraph', 'data', 'object', 'office', 'document', 'http://', 'https://', 'www.', 'schemas', 'uuid', 'clsid', 'normal.dotm', '.dll', '.exe', 'winspool', 'gdi32', 'kernel32', 'user32', 'comdlg32' ]; lines.forEach(line => { const trimmed = line.trim(); // Skip short lines which are usually style titles, formatting parameters, or simple metadata if (trimmed.length < 12) return; // Skip lines that have a low ratio of alphabetical letters to symbols (binary junk indicators) const letterCount = (trimmed.match(/[a-zA-Z\u0900-\u097F]/g) || []).length; if (letterCount < trimmed.length * 0.6) return; // Filter out system and structural metadata lines case-insensitively const lower = trimmed.toLowerCase(); for (const kw of junkKeywords) { if (lower.includes(kw)) return; } // Filter repeating symbols if (/^[_\-\*=+#@%&\\\/|<>]{3,}$/.test(trimmed)) return; // Strip out non-printable ASCII codes let cleaned = trimmed.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/g, ''); if (cleaned.length >= 12) { cleanLines.push(`

${cleaned}

`); } }); return cleanLines.join(''); } // Show PDF preview async function showPdfPreview() { if(!convertedPdfUrl) { showToast('No PDF to preview', 'error'); return; } try { previewSection.classList.remove('hidden'); pdfPreview.innerHTML = '
'; // Load PDF with PDF.js const loadingTask = pdfjsLib.getDocument(convertedPdfUrl); const pdf = await loadingTask.promise; // Get first page const page = await pdf.getPage(1); // Set scale for preview const scale = 1.5; const viewport = page.getViewport({ scale: scale }); // Create canvas const canvas = document.createElement('canvas'); const context = canvas.getContext('2d'); canvas.width = viewport.width; canvas.height = viewport.height; canvas.style.width = '100%'; canvas.style.height = 'auto'; // Clear preview and add canvas pdfPreview.innerHTML = ''; pdfPreview.appendChild(canvas); // Render page const renderContext = { canvasContext: context, viewport: viewport }; await page.render(renderContext).promise; // Add download hint const hint = document.createElement('p'); hint.className = 'text-sm text-center mt-2 text-[var(--secondary-text)]'; hint.innerHTML = ' First page preview only. Click Download for full PDF.'; pdfPreview.appendChild(hint); } catch(error) { console.error('Preview error:', error); pdfPreview.innerHTML = `

Preview not available

You can still download the PDF

`; } } // Show toast notification function showToast(message, type = 'info') { if (localStorage.getItem('smartcsc_pro_active') === 'true' || localStorage.getItem('isProUnlocked') === 'true' || localStorage.getItem('pvc_license_active') === 'true' || localStorage.getItem('smartcsc_sync_mode') === 'cloud') { console.log('Toast suppressed for paid user'); return; } const container = document.getElementById('toast-container'); const toast = document.createElement('div'); const colors = { success: 'bg-green-500', error: 'bg-red-500', info: 'bg-blue-500', warning: 'bg-yellow-500' }; const icons = { success: 'fa-check-circle', error: 'fa-exclamation-circle', info: 'fa-info-circle', warning: 'fa-exclamation-triangle' }; toast.className = `toast-message ${colors[type]} text-white px-6 py-3 rounded-lg shadow-lg flex items-center`; toast.innerHTML = ` ${message} `; container.appendChild(toast); setTimeout(() => { toast.remove(); }, 3000); } // Share functions window.shareOnWhatsApp = function() { const text = 'Convert Word to PDF free online - No registration, no watermark'; const url = window.location.href; window.open(`https://wa.me/?text=${encodeURIComponent(text + ' ' + url)}`, '_blank'); }; window.shareOnFacebook = function() { const url = window.location.href; window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`, '_blank'); }; window.shareOnTwitter = function() { const text = 'Free Word to PDF Converter - Smart CSC VLE Tools'; const url = window.location.href; window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(text)}&url=${encodeURIComponent(url)}`, '_blank'); };