Markdown to PDF/Word Converter
Markdown to PDF/Word Converter turns one Markdown document into three outputs from the same HTML: a PDF rendered on the server and opened in a new tab, a Word-compatible markdown.doc file built in your browser, and plain markdown.html. The .doc is HTML that Word opens and can save as .docx. Markdown is converted with GitHub Flavored rules, up to 200,000 characters.
Gunakan Markdown to PDF/Word Converter
Konversi Markdown ke PDF / Word
Hasil HTML
Baca Isi
One Markdown source, two document formats
Markdown to PDF/Word Converter is for the moment when one person wants a PDF and another wants something they can open and edit in Microsoft Word. You paste Markdown once, convert it to HTML once, and from that same HTML you can generate a PDF, download a Word-compatible .doc file, or take the HTML itself. All three outputs come from the HTML shown in the Output HTML panel, so they always match each other.
The three outputs compared
| Button | File you get | Built where | Good for |
|---|---|---|---|
| Generate PDF | A PDF opened in a new tab, under a long random file name | On the server | Sharing a fixed layout, printing, attaching to email, archiving |
| Download .doc | markdown.doc | In your browser | Recipients who want to edit, comment or track changes in Word |
| Download HTML | markdown.html | In your browser | Pasting into a CMS, email builder or web page |
What the .doc file really is
The Word download is honest about its nature: the hint under the editor calls it a .doc (HTML) file. The tool takes the converted HTML, wraps it in a minimal HTML document with a UTF-8 character set declaration, and saves it with a .doc extension and a Word file type. Microsoft Word opens such files and turns the headings, paragraphs, lists, links and tables into an editable document, which you can then save as a real .docx with Save As.
Because it is not a native Word file, keep these points in mind:
- Some versions of Word show a warning that the file format and extension do not match. Choosing to open it anyway is expected.
- No Word styles, fonts, page size or margins are set by the tool; Word applies its own defaults.
- Images are referenced by their web address rather than packed inside the file. They show only if Word can reach that address, and they may be missing when the file is opened offline or by someone else. Save as
.docxafter the images have loaded if you need them kept. - Other word processors handle HTML-in-.doc files with varying success. Test with the program your recipient uses.
How the PDF is produced
When you press Generate PDF, the HTML from the panel is posted to the site's HTML-to-PDF endpoint. The server sanitises it with HTML Purifier, fetches and embeds any images given as full URLs, wraps it in a simple page and renders it with the tc-lib-pdf library onto A4 portrait pages with 10 mm margins by default. The PDF is saved in the site's temporary folder under a random name and opened in a new tab; it is removed later by the site's automatic cleanup. Anyone with the exact link can open it until then, so save your copy straight away. The badge under the editors shows PDF: ready after a successful run.
How the HTML is produced
Pressing Convert to HTML sends your Markdown to the site's Markdown endpoint, where it is converted with the league/commonmark library using GitHub Flavored Markdown. That means pipe tables, strikethrough, autolinks and fenced code blocks are recognised. A YAML front matter block at the very top is left out, and raw HTML tags typed into the Markdown are stripped. When Sanitize HTML is on, the default, the HTML is also filtered against an allowlist of safe tags before it comes back. Input is limited to 200,000 characters per conversion. The endpoint returns the HTML without storing it.
The .doc and HTML downloads are then assembled entirely in your browser from the panel contents, with no further server request.
Walkthrough
- Paste your Markdown into Input Markdown, or press Paste.
- Leave Sanitize HTML on unless you specifically need the converter's unfiltered markup in the .doc or HTML file.
- Press Convert to HTML and look over the result in Output HTML. The badges show the character counts of input and HTML.
- Press Generate PDF for a PDF, Download .doc for the Word file, or Download HTML / Copy HTML for the markup. You can use all of them one after another.
- Open the .doc in Word, check the layout, and use Save As to keep a
.docxif you plan to edit further.
Generate PDF and Download .doc both convert the Markdown automatically if the HTML panel is empty, so you can skip step 3 when you are in a hurry. Clear empties the editors and resets the PDF badge.
Keep the outputs in sync with your edits
The export buttons reuse whatever HTML is already in the panel. If you edit the Markdown afterwards, the PDF and .doc will still reflect the earlier version until you press Convert to HTML again. Make it a rule: edit, convert, then export.
Practical uses
- Proposals and statements of work drafted in Markdown: PDF for the signed copy, .doc for the client's legal team to mark up.
- Course notes written in a Markdown editor: PDF for students, .doc for a colleague who wants to adapt them.
- Release notes and internal reports where some readers print and others edit.
- Moving content out of a Markdown wiki into an organisation that works in Office documents.
Do and don't
- Do use full
https://image URLs if you want pictures in the PDF; relative paths cannot be fetched by the server. - Do keep tables to a modest number of columns; both A4 portrait PDFs and Word pages have limited width.
- Don't rely on raw HTML or inline CSS in your Markdown for styling; it is stripped during conversion.
- Don't send confidential documents through the PDF option, since the file sits briefly on the server.
- Don't expect a native .docx; convert in Word if your workflow requires one.
Limitations
- 200,000 characters per Markdown conversion.
- Word output is an HTML document with a .doc extension, not a native .doc or .docx package.
- No settings for paper size, margins, orientation, headers, footers, page numbers, fonts or themes in either output.
- Task-list checkboxes and table column alignment are removed whenever sanitising applies, and the PDF stage always sanitises.
- The PDF opens in a new tab, so a pop-up blocker can interfere.
Related tools
If you only ever need PDFs, the Markdown to PDF Converter adds status cards for each stage. For HTML with a live preview and a CommonMark option, use the Markdown to HTML Converter.
Frequently Asked Questions
Pertanyaan yang Sering Diajukan
Komentar (0)
Jelaskan masalah yang Anda alami agar kami dapat menyelidikinya dan meningkatkan alat ini.