Convert a .docx file to a formatted PDF, with a live preview using the same converted document and the same styling that gets printed — not a separate approximation. The final PDF still depends on your print dialog's own margin, scale and page-size settings, which sit outside this tool's control. Nothing is uploaded — the conversion runs entirely in your browser.
Word to PDF
LocalWhat carries over, and what does not
mammoth.js is documented by its own maintainers as converting using the document's semantic structure — a paragraph styled "Heading 1" becomes a real heading — rather than attempting to visually clone the original page:
| Element | Result | Why |
|---|---|---|
| Headings | Reliable | Word's built-in heading styles map directly to real HTML headings |
| Bold, italic, strikethrough | Reliable | Character-level formatting carries over directly by mammoth's default behaviour |
| Underline | Reliable | Off by mammoth's own default (it can be confused with a link), opted back in here with an explicit style mapping to a real underline element |
| Bulleted and numbered lists | Reliable | List structure is preserved, including nesting |
| Tables | Usually | Simple tables convert cleanly; merged cells and complex nested tables are where this — and every semantic converter — struggles |
| Hyperlinks | Reliable | Carried as real links, not just styled text |
| Inline images | Reliable | Embedded directly in the output |
| Exact fonts, spacing, colours | Not preserved | Mapped to this tool's own print styling rather than copied — a semantic conversion, not a visual one |
| Headers, footers, page numbers | Not preserved | These live outside the document body in the .docx format and are not part of what gets converted |
| Footnotes and endnotes | Supported | Listed among mammoth's own supported features — check the preview, since reference-style content can render differently than expected on more complex documents |
| Comments | Ignored | Off by mammoth's own default, on the reasoning that a reviewer's margin comment usually is not meant for the final document |
| Tracked changes | Not preserved | Accept or reject all changes in Word first — the conversion works from the document's current text |
If your document is mostly text with standard headings, lists and simple tables — a report, a letter, an article — expect a clean result. If it depends on exact page layout, headers and footers, or tracked changes, export to PDF directly from Word instead, which is built to preserve exactly that.
Why browser printing for the final PDF
Turning the converted document into a PDF uses your browser's own print engine rather than adding a second, PDF-writing library on top of mammoth.js. The advantages and the trade-offs, stated plainly rather than as a blanket claim that this beats every alternative:
| No extra PDF-writing dependency | mammoth.js is already loaded to read the .docx; a JavaScript PDF library on top would be a second, unrelated 250KB+ dependency for a job the browser already does |
| Native support for CSS paged media | Page breaks, headers repeating across pages, and print-specific styling are handled by the engine every browser ships, not reimplemented |
| You choose the destination | Save as PDF, print to a physical printer, or print to a network printer — the same dialog covers all of it |
| Trade-off: dialogs differ | The exact look of the print dialog, and which options are exposed, varies by browser and operating system |
| Trade-off: settings can be overridden | A visitor can change paper size or margins in the print dialog regardless of what this page suggests — the preview shows the content, not a guarantee of the final page setup |
Common mistakes
Frequently asked questions
Is my document uploaded?
No. It is read using your browser's own File API and converted entirely in your browser — the network panel in developer tools shows no request carrying your document. The only network requests are for the two small libraries that do the reading and the safety cleanup, each fetched once when you choose a file.
Will the PDF look exactly like the original Word document?
No, and this tool does not claim it will. The conversion is semantic — a heading becomes a real heading, a bold word stays bold — rather than a pixel-accurate clone of the original page's fonts, spacing and layout. For an exact visual copy, export to PDF directly from Word instead, which is designed for precisely that.
Why are my headers, footers or page numbers missing?
Word stores these outside the main document body, and the conversion works from that body content. If they matter for the final PDF, export directly from Word instead — its own PDF export does carry them.
Why did my table come out wrong?
Simple tables convert reliably. Merged cells, nested tables, and tables built from manually-positioned text boxes rather than Word's real table feature are where this — and any semantic converter — struggles. Check the preview before saving; if a table looks wrong there, it will look wrong in the PDF too, since the preview and the saved file come from the same conversion.
Does it work with tracked changes?
The conversion works from the document's current text, not its revision history. Accept or reject all tracked changes in Word first, then convert the result.
What if I see a warning after converting?
The conversion library reports anything it could not convert cleanly — an unrecognised style, or an element it does not support — and that warning is shown rather than hidden. Check the preview against your original document in that area before saving.
Does .doc (the older format) work, or only .docx?
Only .docx. The older binary .doc format uses a completely different, more complex file structure. Open it in Word and use "Save As" to convert it to .docx first, then use this tool.
Is there a file size or page limit?
No cap is imposed by this tool. Nothing runs on a server, so there is nothing to ration; a very large document is limited only by your own device's memory, not a rule this tool enforces.
Can I convert the other way, PDF to Word?
Yes — PDF to Word goes in the other direction, extracting text and structure from a PDF into a real, editable Word document, with the same honesty about what does and does not survive the conversion.
Related tools
See the full list of Document Tools, or try:
- PDF to Word — the same job in reverse
- Markdown to PDF — the same browser-print approach, starting from Markdown
- Markdown to Word — a real, editable Word document instead of a fixed-layout PDF
- Merge PDF — combine the resulting PDF with other documents
- Compress PDF — shrink the result if it needs to be smaller