String Utilities Alat telah diperbarui 6 jam yang lalu

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.

Selalu Gratis Mudah digunakan Hasil seketika Pribadi dan aman

Gunakan Markdown to PDF/Word Converter

Konversi Markdown ke PDF / Word

PDF uses backend html-to-pdf. Word download is a .doc (HTML) file.

Hasil HTML

Tautan Alat
Telah disalin ke papan klip.
Bantu Perbaiki Alat Ini

Baca Isi

Pelajari cara kerja alat ini dan kapan harus menggunakannya.

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

ButtonFile you getBuilt whereGood for
Generate PDFA PDF opened in a new tab, under a long random file nameOn the serverSharing a fixed layout, printing, attaching to email, archiving
Download .docmarkdown.docIn your browserRecipients who want to edit, comment or track changes in Word
Download HTMLmarkdown.htmlIn your browserPasting 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 .docx after 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

  1. Paste your Markdown into Input Markdown, or press Paste.
  2. Leave Sanitize HTML on unless you specifically need the converter's unfiltered markup in the .doc or HTML file.
  3. Press Convert to HTML and look over the result in Output HTML. The badges show the character counts of input and HTML.
  4. 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.
  5. Open the .doc in Word, check the layout, and use Save As to keep a .docx if 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

Jawaban singkat atas pertanyaan-pertanyaan yang diajukan pengguna sebelum mempercayai hasilnya.

No. It is an HTML document saved as markdown.doc with a Word file type. Word opens it as an editable document, and you can use Save As to create a native .docx.

Some Word versions notice that the file contains HTML rather than the binary .doc format and ask before opening it. This is expected for this kind of file; choose to open it.

Images are referenced by URL, not embedded. Word shows them if it can reach the address. To keep them permanently, open the file while online and save it as .docx.

On the site's server. The HTML is sanitised, images from full URLs are embedded, and the page is rendered with the tc-lib-pdf library. The PDF is stored briefly in a temporary folder under a random name and opened in a new tab.

They are both built from the HTML currently in the Output HTML panel, so they match each other. If you edit the Markdown afterwards, press Convert to HTML again before exporting.

It decides whether the HTML returned from the Markdown conversion is filtered against a safe-tag allowlist. That affects the HTML panel, the HTML download and the .doc file. The PDF is always sanitised on the server regardless.

A4 portrait with 10 mm margins by default. The tool has no page setup options.

Up to 200,000 characters per conversion. Longer input is rejected by the server.

Komentar (0)

Untuk diskusi pengguna, kasus-kasus khusus, dan tips lanjutan.
Tinggalkan komentar
Komentar Anda akan ditampilkan secara publik setelah dikirim.
Belum ada komentar. Jadilah yang pertama memberikan komentar!
Beritahu Kami!
Laporkan masalah terkait alat ini

Jelaskan masalah yang Anda alami agar kami dapat menyelidikinya dan meningkatkan alat ini.

Apa yang paling membantu
Sertakan data masukan, hasil yang diharapkan, hasil yang sebenarnya, browser/perangkat, serta tangkapan layar jika diperlukan.
Tombol tangkapan layar akan mengambil gambar halaman di peramban dan melampirkan gambar yang dihasilkan ke formulir ini.
Tangkapan layar satu halaman penuh
Direkam di peramban Anda menggunakan newisty.
Belum ada tangkapan layar yang diambil.
Alat Laporan