Convert To PDF
Convert images (JPG, PNG, WEBP, GIF, BMP), plain text, Markdown, and HTML files into PDF — all processed client-side in your browser.
Convert To PDF
Select a conversion type, upload your file or paste content, then download your PDF — all client-side.
Drop images here
JPG, PNG, WEBP, GIF, BMP — multiple files OK
How to Use the Convert to PDF Tool
A client emails you a stack of product photos and asks for a single PDF catalogue by end of day. You do not have Word or Adobe Acrobat installed. Open this tool, drag the images onto the drop zone, select A4 page size with landscape orientation, and click Convert to PDF. The tool compiles every image into a multi-page PDF with one image per page, scaled to fit within 20-point margins. Download the result and email it back. The same workflow works for text documents, Markdown files, and raw HTML source code.
A freelance writer completes a 2,000-word blog post in Markdown and needs to send a formatted preview to the client. Paste the Markdown into the editor, see the live preview on the right panel, and click Print or Save as PDF. The browser print dialog opens with the styled document ready to save as a PDF. The client receives a cleanly formatted document with headings, bold text, code blocks, and lists rendered correctly.
A front-end developer builds an email template in HTML and needs to share a PDF proof with the marketing team. Paste the HTML source into the text area, or drag the .html file onto the drop zone. Click Print or Save as PDF and the browser renders the HTML with its original CSS styling intact. The marketing team sees exactly how the email will look without needing a browser.
A photographer shoots 30 product images and needs them in a single PDF for the client proof sheet. Select all 30 images at once, choose Fit to Image page size so each photo fills its own page, set margins to 10 points, and click Convert to PDF. The tool embeds each image at its original resolution. The resulting 30-page PDF is ready for client review without any desktop software.
A student types lecture notes in plain text and wants a PDF to submit with the assignment. Paste the text, set font size to 12, line spacing to 1.5, and page size to A4. Click Convert to PDF and the tool word-wraps the text across pages with consistent margins. The output is a clean, readable PDF that meets the submission requirements without needing a word processor.
Related tools
How the Convert to PDF Tool Works
The tool processes your input locally in the browser, converting different content types into PDF format using specialised parsing and rendering pipelines. No data leaves your device.
Document Parsing
Each input type is parsed differently. Images are decoded via the canvas API to normalise formats like WEBP and GIF into PNG before embedding. Plain text is split into lines and word-wrapped to fit within page boundaries using the font metrics from the embedded Helvetica font. Markdown is converted to HTML in real time using the marked library, which handles headings, lists, code blocks, and tables. HTML files are loaded into a styled render frame that preserves tags and layout.
PDF Rendering Engine
Images and text are compiled using pdf-lib, a JavaScript library that generates PDF files directly in the browser. Each image is embedded onto a new page at its original resolution, and text is drawn line-by-line using embedded Helvetica fonts with configurable size and line spacing. Markdown and HTML content are exported through your browser native print-to-PDF functionality instead, which renders the styled content into a PDF using the browser rendering engine.
Page Layout and Formatting
The tool applies configurable page dimensions, margin insets, and orientation settings. For image conversions, scaling is calculated to fit images within the page while preserving aspect ratios. The Fit to Image option calculates the exact page size needed to display the image at full resolution with the specified margins. Text output respects line spacing and font size, with automatic page breaks when content overflows. Headers, code blocks, and lists from Markdown and HTML are formatted with print-ready CSS that ensures consistent rendering across browsers.
Frequently Asked Questions
What file formats can I convert to PDF?
The tool supports JPG, PNG, WEBP, GIF, and BMP images, plain text, Markdown, and HTML files. HEIC files from Apple devices should be converted to JPG before use because the browser canvas API does not natively decode HEIC format. For images, the tool embeds them at their original resolution into the PDF.
Is there a maximum file size limit?
There is no hard server limit since all processing happens in your browser. However, very large files may slow down conversion or cause memory issues depending on your device and available RAM. For image conversions, each image is decoded into a bitmap before embedding, so a 50 MB image may temporarily use 200 MB of browser memory during processing.
Are images preserved when I convert to PDF?
Yes, images are embedded at their original resolution into the PDF. The tool scales them to fit within the selected page size while maintaining their aspect ratio and quality. JPEG images are embedded directly without re-encoding, while PNG, WEBP, GIF, and BMP images are converted to PNG via the canvas API before embedding.
Is the original formatting retained in the PDF?
Text formatting like line spacing and font size is preserved. Markdown headings, bold, italic, code blocks, and lists are rendered with structured CSS that produces clean print-ready output. HTML layouts retain their original styling and structure in the output PDF because the browser rendering engine handles the layout.
Does this tool work offline?
Yes, once the page has loaded, all conversions happen entirely in your browser without any network connection. Your files are never uploaded to a server. The pdf-lib and marked libraries are loaded from CDN on first visit, but once cached they work offline. Markdown and HTML print-to-PDF uses the browser built-in print functionality.
Can I combine multiple images into a single PDF?
Yes, you can drop or select multiple image files and they will be compiled into a single multi-page PDF. Each image is placed on its own page in the order you selected them. You can reorder by removing and re-adding images, and the One page per image checkbox controls whether each image gets its own page or multiple images are placed on a single page.