Or drop a local .html file to load itOr drop a local .html file to load it
or click to browseor tap to choose
Reads the file's content directly into the box above
Large files (over 50 MB) may take longer or run out of browser memory
Next step: Premium application
Universal File Converter
PremiumDrop any image, PDF, Word, Excel, PowerPoint, HTML or text file and see every format it can become.
2 trial uses a day · $3 day pass or $9.99 a month
Open Universal File ConverterConvert many or mixed files
File Conversion Studio
Drop a whole folder, set a rule for each kind of file and get one ZIP with a results report. Convert a whole folder of mixed files with saved recipes, a quality panel for each format and a results report.
Open File Conversion Studio with HTML to PDF readyWatch: HTML to PDF in Action
Converts HTML content into a PDF — paste HTML code directly, or drop a local .html file, and it's rendered and converted, rows, pictures and list items are kept whole across page breaks, text stays selectable for Western European characters and links stay clickable. Scripts in the pasted HTML never run.
Paste your HTML into the box, or drop a .html file to load its content into the box automatically, then click Convert. Choose page size, orientation, margins and optional page numbers, then download.
This renders HTML you provide directly — it can't fetch and convert an arbitrary live webpage by URL, since most sites block that kind of cross-origin access from a browser for security reasons (the same restriction any browser-based tool runs into, not something specific to this one). If you want a specific webpage as a PDF, most browsers can already do that natively through the Print dialog's "Save as PDF" option. External images referenced by URL in your HTML may not appear if the source blocks cross-origin loading — images embedded as data URLs always work.
- Can this convert a live webpage by just pasting in its URL?
- No — this renders HTML content you paste in or drop as a local file, directly. Most sites block cross-origin access to their content from a browser-based tool for security reasons, so fetching an arbitrary live webpage by URL isn't supported. Most browsers can already save a specific webpage as a PDF through the Print dialog's "Save as PDF" option.
- Will external images in my HTML show up in the PDF?
- Images referenced by URL may not appear if their source blocks cross-origin loading — images embedded directly as data URLs always work correctly.
- Can I drop a local .html file instead of pasting the code?
- Yes — drop a .html file and its content loads directly into the text box, the same as if you'd pasted it. It's read locally in your browser, not uploaded anywhere.
- Does this support CSS styling, or just plain text?
- Yes — inline styles and <style> tags in your HTML are both rendered, so real visual styling (colors, fonts, layout) carries through to the PDF, not just plain unstyled text.
- What happens with content that's longer than one page?
- It automatically splits across multiple pages, using the page size you choose (A4, Letter or Legal) for the page breaks — long content isn't cut off or forced onto a single oversized page.
- Are my files uploaded to a server?
- No — rendering and converting both happen entirely in your browser. Neither your HTML nor a dropped file is ever uploaded anywhere.
- Can JavaScript in my HTML run and affect the output?
- No. The HTML is drawn in your browser inside a frame that blocks scripts, so JavaScript never runs and content a script would create does not appear. Only the static markup and its styles are converted to the PDF.
- Why would I use this instead of my browser's own Print to PDF?
- Print to PDF is the right choice for converting a webpage you're already viewing. This tool is for HTML you're generating, editing, or don't have loaded as a live page — pasting a code snippet, a saved .html file, or HTML produced by another tool, without needing to open it as an actual page first.
- Can I type a website address and get a PDF of that page?
- No. The tool converts HTML that you paste or drop, and it does not fetch live pages, because most sites block that kind of cross-origin access from a browser. Use your browser's Print dialog and choose Save as PDF for a page you have open.
- Why is one of my images missing?
- A picture linked from another site may refuse to load into the render area. When an image fails, it is replaced with a blank space so the rest of the page still converts. Images embedded as data URLs always work.
- Will the text and links in the PDF work?
- Text is selectable through an invisible layer for words made of Western European characters, and links to http, https and mailto addresses are clickable. Other scripts appear in the page picture but cannot be searched or copied.
- How does it choose where pages break?
- Table rows, images, list items, paragraphs, headings, code blocks, quotes and figures are kept whole where possible instead of being sliced. You can also force a break by giving an element a page-break-before or break-before value of page or always.
- Does JavaScript in my HTML run?
- No. The HTML is drawn in a frame that blocks scripts, so content a script would create does not appear. Only the static markup and its styles are converted, and a document longer than 200 pages must be split into parts.
How to use HTML to PDF
Paste markup into the HTML Content box, or drop a .html or .htm file into the area beneath it and its source is loaded into the box for you. The box starts with a short Sample Document so you can see how a conversion looks. Then set Page size to A4, Letter or Legal, tick Landscape to turn the sheet sideways, and enter a Margin in millimetres between 0 and 50; it starts at 15.
Press Convert to PDF and keep the tab open while pages render one after another. Stop cancels the run. When it finishes, a preview appears with Download and Edit buttons, and Edit takes you back to change settings and convert again. The file is named after the dropped file, or after the page's title tag, or simply document if neither exists.
When to use it
This helps when you have an HTML invoice, a saved report, an email template, a hand-coded resume or documentation exported from another system and want a fixed-layout PDF to attach or print. Because you supply the markup yourself, inline styles and style blocks decide exactly what lands on each page, with no live site involved.
When not to use it
Do not expect it to fetch a web address; it converts only markup you provide, and for a page already open in your browser the Print dialog's Save as PDF is simpler. It is also a poor fit for documents that must reflow like a word-processor file, or that depend on page-margin rules and running headers, because the tool looks only for forced page-break properties.
Tips for best results
To start a new page at a chosen spot, give that element a page-break-before: always or break-before: page style. Pictures are the likeliest thing to go missing, so embed them as data URLs instead of linking to another site. If a table is wider than the page, the whole layout is scaled down to fit rather than cut off, so narrow the content when the text ends up too small to read comfortably.
Limitations
Each page is a picture of the rendered HTML with an invisible text layer on top, so the PDF is heavier than a text-only file, and only words made of standard Western European characters become searchable. Other scripts show in the picture but cannot be selected. Links stay clickable only for http, https and mailto addresses. Output stops at 200 pages, and any content a script would have built is absent because scripts do not run.
Privacy
Pasted or dropped markup is rendered inside a hidden frame that blocks scripts, and every PDF page is drawn and assembled in that same tab, so no text or file is sent to this site. One exception: anything your HTML points to by web address, such as an image or stylesheet, is requested by your browser from that other site, as it would be when opening the page normally.
More from PDF Tools: