Turn an HTML table into a PDF in just a few clicks! Whether you're creating reports, invoices, or shareable data, here's how to convert data tables.
Turn an HTML table into a PDF in just a few clicks! Whether you're creating reports, invoices, or shareable data, here's how to convert data tables.
Tables are a big deal in HTML—whether it's for reports, invoices, or lining up product comparisons. They help keep everything neat and structured, just like PDFs do. No matter what device someone is using, a well-formatted table makes sure the info stays clear and easy to read.
But saving an HTML table as a PDF doesn’t always go smoothly. Web pages aren’t designed to fit standard paper sizes, so your table might get squished between the margins or, worse, break awkwardly across two pages, making it a pain to read.
Luckily, there’s an easy fix using a PDF converter and your favorite word processor.
Mastering HTML to PDF Table Conversion
The easiest way to turn an HTML table into a PDF starts right in your browser. Every major browser—Chrome, Edge, Firefox, Safari—has a “Save as PDF” option.
- Open the webpage with the table.
- Press Ctrl + P (Windows) or Cmd + P (Mac) to open the print menu.
- Choose "Save as PDF" as the printer.
- Click Save, pick a file name, and you’re done!

Saving an HTML table as a PDF in Chrome
If part of the table gets cut off, look for a "More settings" or "Advanced settings" option in the print menu to adjust margins, paper size, and page orientation. Switching the page to landscape mode often helps wide tables fit better. Some browsers let you customize how much the page is scaled—try reducing it slightly if it doesn’t fit neatly.
If you manage to change settings and get the HTML table looking perfect in a PDF, you don’t need to do anything else after saving. But, if tweaking the settings in the print dialogue still leaves you with a table that is squashed or cut off, it’s time for some advanced editing.
- Upload your document to Smallpdf’s PDF Converter.
- Choose to convert it to Word (.docx) format.
- Download the DOCX file, and open it in Word, Google Docs, Pages, or LibreOffice.
- Adjust the table layout—fix column widths, spacing, or any formatting issues.
- Once the table looks good, save or export the document as a PDF again.

Editing a table in Word
This extra step helps when the table formatting doesn’t look right after a direct HTML-to-PDF save. You can also manually insert section breaks to prevent the table from splitting over two pages. Once happy, save the document as a PDF again.
Extracting Tables from a PDF and Converting Back to HTML
At some point, you might need to copy a table from a PDF to HTML—but getting this right is not quite as easy as going from HTML to PDF.
Why Convert a PDF Table to HTML?
PDFs are great for preserving table layouts, but if you need to update or repurpose the data for a website or online document, you’ll need to convert it back to HTML. Here, “Save as…” or copying and pasting don't work well.
The best approach is to recreate the table manually using tools that keep the structure clean.
Recreating the Table in a CMS or HTML Editor
Since copying and pasting a table directly from a PDF doesn’t work, the best way to get it into HTML is by rebuilding it manually.
If you’re using a Content Management System (CMS) like WordPress, Joomla, or Wix, open the WYSIWYG (What You See Is What You Get) editor and use the built-in table tools to recreate the table. Copying and pasting the content of each cell should be fine, it just doesn’t work for the table itself.
If you’re comfortable working with HTML, you can use an HTML editor to manually write the table structure using the relevant HTML tags.
If this sounds too technical, it’s best to ask a developer to handle the table conversion, ensuring it’s clean and responsive for different screen sizes. Especially if this is for a company website.
Rebuilding the table this way ensures it displays correctly across all browsers and devices, without unnecessary code that could cause loading and formatting issues.
Best Practices for Keeping Table Formatting Intact
- Use clean HTML – Avoid unnecessary inline styles and extra code that can make tables harder to edit later.
- Keep columns aligned – Check that widths are consistent, so the table doesn’t break on different screen sizes.
- Test the table on multiple devices – A table that looks fine on a desktop may need adjustments for mobile users.
Even though some of these methods require a little extra effort, this always leads to cleaner tables in both PDFs and HTML. Turning you into a master of table conversions.
