Three ways to turn a .md file into a clean, shareable PDF — from a free browser tool to command-line options.
Markdown is great for writing — it's plain text, version-controllable, and renders everywhere. But when you need to share a document with someone outside a technical context, or attach it to an email, PDF is the universal format. PDF preserves your formatting exactly, works offline, and doesn't require the reader to have any markdown renderer installed.
Choose based on your needs — no-install browser tools, browser print, or command line.
The fastest way. Open markdownutils.com/pdf, paste your markdown, choose a theme, and export. Everything runs in your browser — nothing is uploaded to a server.
Step by step
.md file from your computer.If you're already viewing rendered markdown — on GitHub, VS Code preview, or any other renderer — you can print it to PDF using your browser's built-in print function.
Quality varies depending on the renderer's CSS. GitHub's markdown renderer produces clean PDFs. Raw .md files opened directly in a browser won't render — you need a viewer first.
Pandoc is the most powerful option — a universal document converter that can turn markdown into PDF, Word, HTML, ePub, and more. Requires installation and a LaTeX engine for PDF output.
Install Pandoc:
# macOS (Homebrew) brew install pandoc brew install --cask basictex # Ubuntu / Debian sudo apt-get install pandoc texlive # Windows (Chocolatey) choco install pandoc miktex
Convert a markdown file:
# Basic conversion pandoc README.md -o output.pdf # With custom margins and font size pandoc README.md -o output.pdf \ -V geometry:margin=1in \ -V fontsize=12pt # With a custom template pandoc README.md -o output.pdf --template=mytemplate.tex
Pandoc gives you full control over the output, but requires a working LaTeX installation which can be complex to set up. For most use cases, the browser-based approach is faster.
Markdown Utils supports 5 themes, 13 font families, and 3 style controls — all reflected live in the preview before you export.
Light
Clean white background, slate headings, blue links and blockquotes. The default — works for any document type and prints cleanly on standard paper.
Best for: Reports, documentation, general use
Dark
Near-black (#0a0a0a) background with slate body text, indigo accents, and cyan inline code. Ideal for code-heavy documents or sharing in developer contexts.
Best for: Technical docs, code references, developer audiences
Sepia
Warm cream background (#f5f3ed), Georgia serif body font, warm brown borders. Code blocks use a high-contrast black-on-white style. Great for long-form reading.
Best for: Long documents, essays, documentation meant to be read carefully
Minimal
Pure black on white with no decorative color — borders, blockquotes, and table headers all in black. Helvetica Neue body font. Closest to a printed book or academic paper.
Best for: Academic papers, formal reports, print-first documents
Ocean
Deep navy background (#0d1b2a), muted blue body text, teal accents and links. A dark theme with a distinct nautical palette — more atmosphere than the Dark theme.
Best for: Portfolio documents, creative technical writing, developer showcases
All Google Fonts are loaded on-demand when selected — they appear in both the preview and the exported PDF.
| Font | Type | Best for |
|---|---|---|
| System Sans | Sans-serif | Default — uses your OS's native UI font. No loading delay. · Best for: All-purpose, fastest rendering. |
| Sans Serif | Sans-serif | Helvetica Neue / Arial fallback stack. · Best for: Cross-platform consistency. |
| Inter | Sans-serif (Google) | Designed for screens. Excellent readability at all sizes. · Best for: Technical docs, SaaS documentation. |
| Roboto | Sans-serif (Google) | Google's signature font. Clean and neutral. · Best for: General documents, Android-adjacent projects. |
| Open Sans | Sans-serif (Google) | Humanist, very readable at small sizes. · Best for: Body-heavy documents, accessible content. |
| Lato | Sans-serif (Google) | Slightly warm, elegant geometric feel. · Best for: Business reports, presentations. |
| Poppins | Sans-serif (Google) | Rounded, geometric, modern. Great for headings. · Best for: Creative docs, modern presentation style. |
| Nunito | Sans-serif (Google) | Friendly rounded terminals. Approachable tone. · Best for: Consumer-facing docs, tutorials. |
| Georgia | Serif | Classic web serif. Excellent for long-form reading. · Best for: Essays, long documentation, anything print-first. |
| Merriweather | Serif (Google) | Designed specifically for reading on screens. · Best for: Long-form technical writing, blog-style docs. |
| Playfair Display | Serif (Google) | High-contrast, elegant. Pairs well with a sans body. · Best for: Proposals, covers, portfolio documents. |
| Monospace | Monospace | System monospace fallback (Courier New etc.). · Best for: Code-heavy docs, terminal-style output. |
| JetBrains Mono | Monospace (Google) | Developer monospace with ligatures. Highly readable. · Best for: Developer docs, code-first documents. |
Font size
Range: 10px – 20px
Default: 14px
Controls the base font size for body text. Headings scale proportionally. Use 12–13px for dense technical documents, 15–16px for comfortable reading, 18–20px for presentations.
Line spacing
Range: 1.2 – 2.5
Default: 1.75
The line-height multiplier. 1.4–1.6 is tight and compact, 1.7–1.9 is comfortable for reading, 2.0+ is airy and open. The default (1.75) balances density with readability.
Margins
Range: None / Narrow / Normal / Wide
Default: Normal
Controls the padding around the document content. Normal (50px top/bottom, 60px sides) suits most documents. Narrow saves space for dense content. Wide adds breathing room for clean reports. None is minimal padding for full-bleed layouts.
Yes — the Markdown Utils converter is completely free with no limits, no sign-up, and no watermarks on the output.
No. Everything runs in your browser. Your content never leaves your computer.
Yes. Click the Upload button in the toolbar to load any .md or .txt file directly into the editor.
Browsers add default margins when printing. The Export PDF button removes these automatically using @page { margin: 0 } and adds clean content padding instead.
Yes. Specify the language after the opening ``` (e.g. ```python) and the PDF will include syntax-highlighted code blocks.
Yes. The font dropdown includes system fonts and Google Fonts like Inter, Merriweather, Playfair Display, JetBrains Mono, and more.
📄
Free, instant, no sign-up. Upload your file or paste markdown and export in seconds.