Markdown to PDF

Paste Markdown or open a .md file, check the live preview, and download a PDF with real, selectable text, tables and code blocks. Free, no signup, no watermark.

Or open a file: (you can also drop it on this box)

Preview

What is supported

Everything in GitHub Flavored Markdown: headings, bold and italic, links, ordered and bulleted lists, task lists, tables, block quotes, fenced code blocks, strikethrough, horizontal rules and images from public URLs. Raw HTML inside the Markdown is kept too, so you can add a <div class="page-break"></div> wherever you want a new page to start. Headings stay with the paragraph that follows them, and code blocks and table rows are not split across pages when they fit on one.

How it works

Your Markdown is turned into HTML in this page with marked, the same parser many static site generators use, and shown in the preview. When you click Download, that HTML is printed to PDF by Chromium on our server, the same engine as Chrome's "Save as PDF", so the text stays text: you can search it, copy it and the links still work. The PDF is generated and returned straight away; we don't keep a copy. The free tool allows 5 downloads a day per visitor, and a free API key gives 25 more a month.

Which style should I pick?

StyleLooks like
GitHubA README on GitHub: Inter, gray code blocks, ruled headings.
Good for docs, READMEs and technical notes.
DocumentA printed report: serif body text, larger line spacing, centered title.
Good for essays, letters and reports.
CompactSmaller text and tighter spacing to fit more on a page.
Good for cheat sheets and long tables.

Convert Markdown to PDF from code

Need to turn READMEs, changelogs or generated reports into PDFs in a script or CI job? Parse the Markdown with marked and send the HTML to the Shotmint PDF API. No Chromium, Pandoc or LaTeX to install. Save this as md2pdf.mjs, run npm i marked, then SHOTMINT_KEY=your_key node md2pdf.mjs README.md:

// md2pdf.mjs: node md2pdf.mjs README.md  ->  README.pdf
import { readFile, writeFile } from 'node:fs/promises';
import { marked } from 'marked';

const input = process.argv[2] ?? 'README.md';
const css = `
  body { font: 15px/1.6 Inter, "Segoe UI", Helvetica, Arial, sans-serif; color: #1f2328; }
  h1, h2 { border-bottom: 1px solid #d8dee4; padding-bottom: .3em; break-after: avoid; }
  pre { background: #f6f8fa; padding: 12px; border-radius: 6px; white-space: pre-wrap; break-inside: avoid; }
  code { font-family: "DejaVu Sans Mono", ui-monospace, Menlo, monospace; font-size: 85%; }
  table { border-collapse: collapse; } th, td { border: 1px solid #d0d7de; padding: 6px 12px; }
  img { max-width: 100%; }`;
const html = `<!doctype html><meta charset="utf-8"><style>${css}</style>
${marked.parse(await readFile(input, 'utf8'))}`;

const res = await fetch('https://shotmint.creasework.com/v1/pdf', {
  method: 'POST',
  headers: { 'X-API-Key': process.env.SHOTMINT_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ html, format: 'A4', margin: '18mm' }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
await writeFile(input.replace(/\.md$/i, '') + '.pdf', Buffer.from(await res.arrayBuffer()));
console.log('Saved, credits left:', res.headers.get('x-credits-remaining'));

Options: format (A4, Letter, Legal, A3, A5, Tabloid), landscape, margin (like 18mm or 0.75in) and scale. Each PDF is 1 credit. €5 buys 2,000 with no subscription, and credits never expire.

Get 25 free renders a month API docs

FAQ

Why are my images missing? Images need a public http(s) URL. A relative path like ./img/logo.png only exists on your computer, so upload the image somewhere public or use the full URL.

Can I add a page break? Yes. Put <div class="page-break"></div> on its own line where the next page should begin.

Is the text selectable in the PDF? Yes. It is a real text PDF, not a picture of the page, so it stays small, searchable and accessible.

Do you keep my document? No. The HTML is sent once to render the PDF and is not stored. The preview never leaves your browser.

Is there a limit? 5 PDFs a day per visitor without a key. Get a free API key for 25 more a month, or buy credits for bulk conversions.

Related: TXT to PDF, HTML to PDF, URL to PDF, code to image, merge PDF, compress PDF, add page numbers to PDF, PDF to text.

Related tools

PDF to Markdown · Google Docs to Markdown · Markdown table generator · CSV to Markdown table · HTML to Markdown · Markdown to Word · Markdown to HTML · Website to Markdown · DOCX to Markdown · Excel to Markdown Table · Markdown Table to CSV Converter · Markdown to DOCX · Markdown Viewer · Online Markdown Editor with Live Preview · URL to Markdown · Word to Markdown Converter · HTML to PDF · Word to PDF · URL to PDF · Bulk URL to PDF · Merge URLs to PDF · Excel to PDF · TXT to PDF · all free tools