HTML/Markdown to PDF
The HTML/Markdown to PDF tool takes an HTML or Markdown file from your device (not a live URL) and converts it to PDF, preserving headings, paragraphs, lists, bold/italic text, and links. Markdown is converted to HTML using a dependency-free, built-in parser, then rendered through your browser's own real text engine — the same technique that makes Arabic and mixed-language content come out correctly with zero manual text shaping. All conversion happens in your browser; the file is never uploaded to a server.
Conversion happens entirely in your browser — the file is never uploaded to a server.
Headings, paragraphs, lists, bold/italic text, and links convert with good accuracy, but very advanced formatting (complex tables or custom CSS layouts) may not match the original exactly.
Drag an HTML or Markdown file here or choose one
.html, .htm, or .md
What this tool does
Converts an HTML or Markdown file from your device into a paginated PDF. Markdown is converted to HTML first, raw HTML is sanitised before being displayed, and the result is rendered by the browser's engine.
When to use it
- You wrote documentation or an article in Markdown and want a PDF to share.
- You have a locally saved HTML page you need as a fixed document.
- You are preparing Markdown notes or a report for printing.
How to use it
- Put an .html or .md file on the drop area or choose it.
- Run the conversion.
- Download the resulting PDF.
A practical example
Input
A .md file containing headings, a list and a code block.
Output
A PDF with the headings at their sizes, the list in list form and the code block in a monospaced font, paginated automatically.
Limitations
- The input is a file from your device, not a web address — this tool never fetches a page from the internet.
- External resources an HTML file references, such as images or stylesheets on the network, may not appear, because rendering is local.
- Layouts that depend on JavaScript or on user interaction are not executed.
- Pagination is computed at render time, so a long element can break across two pages.
Privacy and processing
Everything happens inside your browser: the file is not uploaded, and no content is fetched from the network during conversion.
Technical notes
- Raw HTML is sanitised with DOMPurify before it ever touches the page, because it is untrusted content the user picked from their own filesystem.
- Markdown conversion uses a converter written inside this project rather than a third-party library.
- Rendering and pagination go through jsPDF using the browser's engine, the same approach as the Word and Excel to PDF tools.
Frequently Asked Questions
No — the conversion happens entirely in your browser; the file is never uploaded to a server.