How to Extract Tables from PDFs with AI (2026 Guide)

Can AI convert a PDF into a structured table? Yes. How the methods compare, a tested 63-row example, schema tips for multi-page tables and catalogs, and export to Excel, CSV, or JSON.

How to Extract Tables from PDFs with AI (2026 Guide)
TL;DR
Yes, AI can turn a PDF table into structured rows and columns you can open in Excel. The method that works best is to read the page as a document with its layout intact, not as loose text, and to describe the columns once so every new PDF is parsed the same way. In a test we ran on a synthetic 3-page order with 63 rows, a repeated header, section headings, and subtotal rows, Airparser's vision engine returned all 63 rows with every cell correct and the totals matched. Scans and messy real-world files can behave differently, so test your own documents before you rely on the result.

Tables are the hardest part of a PDF to extract. A PDF stores where characters sit on a page, not which characters belong to which cell. A table that looks obvious to a person is only a scatter of text to a program, and merged cells, repeated headers, rows that break across pages, and scans make it worse.

This guide explains why tables fail, compares the main ways to extract them, shows a real tested example, and walks through setting up repeatable table extraction with Airparser, including the schema tips that make the biggest difference.

Can AI convert a PDF into a structured table or spreadsheet?

Yes. An AI document parser reads the PDF page, finds the table, and returns each row as a record with named columns. You can then export the rows as XLSX, CSV, or JSON, or send them straight to Google Sheets, a webhook, or another tool.

The difference from a plain converter is that you tell the parser what the table contains. You name the columns, such as SKU, description, quantity, and price, and the parser returns those values for every row. The output is data you can use, not a copy of the page's look, so cell colors and borders are not recreated.

Why tables in PDFs are hard to extract

A PDF is built to look the same everywhere. It has no table object that a tool can simply read, which creates several recurring problems:

  • No real cell structure. Columns are inferred from how far apart words are, so uneven spacing breaks them.
  • Merged and nested cells. A heading that spans several columns, or a subtotal row, does not fit a simple grid.
  • Tables that continue across pages. Headers repeat, footers interrupt, and totals appear only on the last page.
  • Wrapped cells. A long description that wraps to a second line can be read as a separate row.
  • Scanned documents. A scan is a picture with no text to read until OCR creates it, and OCR can distort table structure.
  • A different layout from every sender. The same invoice or price list looks different from each supplier.

Methods for extracting tables from PDFs compared

MethodWorks well forWhere it breaks
Copy and pasteOne small, clean tableSlow, loses structure, does not scale
Rule-based or template toolsDocuments with one fixed layoutBreak when a sender changes the layout; every new layout needs a new template
Open-source librariesDigital PDFs with ruled tables, for developersWeak on scans and borderless tables; you maintain the code
OCR then parseScanned pages with simple tablesThe OCR step can distort table structure and alignment
AI document parser with a vision engineMixed layouts, scans, and tables whose layout carries meaningVery small or blurry text can still be misread, so review matters

If you currently use an open-source table tool and want to compare, see Airparser as a Tabula alternative. For a deeper comparison of approaches, read traditional OCR vs LLM parsing and why a vision engine parses documents that break traditional OCR.

What to look for in a PDF table extraction tool

Whichever tool you consider, test it against these points rather than a feature list:

  • Multi-page tables. Does it keep one table together across pages and ignore the repeated header?
  • Rows you do not want. Can you exclude section headings and subtotal rows from the output?
  • Scans and photos. Does it read an image of a page, or only digital PDFs?
  • Stable columns. Do you get the same column names on every document?
  • Checks. Can you verify results, for example by comparing the sum of the rows with the printed total?
  • Where the data goes. Can it export to Excel or send rows to your other tools automatically?

A tested example: 63 rows across 3 pages

To check the claims above, we generated a synthetic supply order and ran it through an Airparser inbox with the vision engine. The document is built to be awkward on purpose, although it is a clean digital PDF.

Page 1 of the three-page synthetic supply order used in the table extraction test, with section headings, wrapped descriptions, and a subtotal row
Page 1 of the synthetic order. It has section headings, wrapped descriptions, and a subtotal row. The header repeats on page 2, and the totals fall on page 3.
What the document containsDetail
Pages3
Product rows63, in three sections
Awkward featuresHeader repeated across pages, section heading rows, subtotal rows, descriptions wrapping onto two lines, totals split across pages
SchemaFour document fields (order number, date, currency, grand total) and one table field, line_items, with five columns: SKU, description, quantity, unit price, line total

We told the parser in the table field's description to include only product rows and to skip heading and subtotal rows, and that the header repeats on every page. Here is what came back:

CheckResult
Rows returned63 of 63, in the original order
Cells correct315 of 315 (63 rows x 5 columns), compared with the known answer
Document fields4 of 4, including the grand total on page 3
Sum of line totals vs printed net totalMatched
Heading or subtotal rows leaked into the tableNone
Usage and time3 credits (one per page), about 23 seconds

Two rows of the output looked like this:

{
  "sku": "A2951-01",
  "description": "Cable gland 50 mm threaded, chrome finish, suitable for potable water and heating systems up to 95 C",
  "quantity": 100,
  "unit_price": 212.42,
  "line_total": 21242
},
{
  "sku": "A2681-02",
  "description": "Elbow 10 mm shielded, halogen free, with strain relief and colour-coded insert",
  "quantity": 150,
  "unit_price": 182.72,
  "line_total": 27408
}

How to read this result. It is one run on one synthetic, clean, digital document, so it is an illustration and not a benchmark. We did not test scans in this run. Real files with faded print, skewed pages, or unusual layouts can produce errors, which is why the checks and review steps below matter. You can try a similar two-page sample on the PDF table parser page, which offers a sample PDF and the resulting Excel file.

How Airparser extracts tables

Airparser reads a document with one of two engines. The vision engine is the default. It analyzes the document in its original visual form, including text placement, tables, and formatting, so it is the right choice when layout and tables carry meaning. The text engine converts the document to text first. For scans, that means an OCR step, which can remove or distort table structure, so it is better kept for simple, machine-generated files.

You describe a table by creating a field of type List (Table). Think of each attribute as a column header: every attribute you add becomes a column of the repeating data. Because you describe the columns in plain language instead of drawing a template over a layout, the same setup keeps working when the layout changes. Our article on vision vs text engines explains how to choose.

How to extract tables from PDFs with Airparser, step by step

The Airparser create inbox dialog with the vision parser engine selected by default
Creating an inbox. The vision engine is the default, and confidence scores can be switched on.
  1. Create an inbox. An inbox holds the documents of one kind, such as supplier orders or bank statements, and has its own email address.
  2. Choose the engine. Keep the vision engine for scans, complex layouts, and tables that depend on position. Use the text engine for simple, machine-generated documents.
  3. Add the document fields. Add the single-value fields you need, such as supplier, document number, and date. Date fields reformat any source date into the format you choose, for example YYYY-MM-DD.
  4. Add a List (Table) field for the table. Name it, for example, line_items, then add one attribute per column. You can also let Airparser suggest a schema from an uploaded sample.
  5. Describe each column and the table itself. Say where to look, what a value looks like, and what to skip. This is where accuracy is won.
  6. Send documents. Forward emails with attachments, upload files, use the API, connect Zapier or Make, or import existing emails from a mailbox.
  7. Review and export. Open Parsed Data to see the values next to the original document. Use Export to download XLSX, CSV, or JSON, choosing all fields or the table field as the source, and preview the columns before you download.

Tip for long reports: if the table sits on a few pages of a long PDF, use the inbox's page selection in Inbox Settings. You can keep all pages, odd or even pages, or custom ranges. Pages that are discarded are removed before parsing, and only the kept pages count toward usage.

A parsed invoice in Airparser showing the line items table extracted as a list field, with Excel, CSV, and JSON export buttons
A parsed invoice. The table becomes a line_items field with one entry per row, and the Excel, CSV, and JSON export buttons sit above the data.

Schema tips for cleaner table extraction

  • Describe columns the way the document labels them. If a column is headed "Qty." or "Amount due", say so in the description.
  • Say what to skip. State that section headings, subtotal, tax, and shipping rows do not belong in the table. In our test this kept all 63 product rows clean.
  • Handle multi-page tables explicitly. Tell the parser that the header repeats on each page and that the table continues.
  • Specify number formats. Say whether amounts use a decimal comma or point, and whether currency symbols should be stripped.
  • Use a default value. A default gives you a predictable result when a cell is empty.
  • Add a total check. Extract the document total as a separate field and compare it with the sum of the line totals. A mismatch is the fastest way to find a misread row. See data validation in document parsing.

Extracting product catalogs and supplier price lists from PDFs

Supplier catalogs and price lists are one of the most common table jobs, and they are often laid out in several columns or cards instead of a single grid. To get them into a spreadsheet:

  1. Define one row per product. Use a table field with columns such as SKU, product name, pack size, unit, and price.
  2. Describe the layout. If a catalog shows two products side by side, say so, and say which labels belong to each product.
  3. Keep documents short. Airparser recommends keeping documents within 1 to 5 pages and splitting PDFs longer than 10 pages before sending them, so cut a long catalog into sections.
  4. Choose the pages you need. Use page selection to skip covers and index pages.
  5. Export and clean once. Download XLSX or CSV, or send the rows to Google Sheets, and apply your unit and price rules in one place.

For ongoing price-list updates, create a dedicated inbox so every new file arrives with the same schema.

Tables in scanned PDFs and photos

A scan has no text to read, so it needs a reader that works on the image. With the vision engine, Airparser reads the page image directly and keeps table positions, so you do not depend on a separate OCR step that can distort the structure. JPG, PNG, and BMP images and scanned PDFs are supported.

Scan quality still matters. Scan flat and straight, light the page evenly, keep contrast high, and avoid blur. Very small, blurry, or low-quality text may be misinterpreted, even by a vision engine. For mostly printed scans, see how to convert a scanned PDF to text.

Common use cases for table extraction

  • Invoice line items. Pull descriptions, quantities, and prices into rows. See how to extract invoice line items from PDFs.
  • Bank statements. Turn transactions into rows you can reconcile. See bank statement data extraction.
  • Purchase orders and packing slips. Capture item lists and quantities for matching.
  • Product catalogs and price lists. Move SKUs, descriptions, and prices into a structured file.
  • Financial reports. Extract table figures for analysis instead of retyping them.

Limits to plan for

No extraction method is perfect. Keep a check on the totals and send low-confidence documents to review before the data is exported. Airparser's review queue can hold a document when a field's confidence score falls below your threshold (when confidence scores are enabled), and a reviewer can approve or correct the data. Read how the review queue works and our guide to human-in-the-loop document extraction.

Where the data goes next

Once a table is extracted, you can keep it as a file or send it onward automatically: XLSX, CSV, and JSON downloads; Google Sheets; Zapier, Make, and n8n; webhooks; and the REST API. If you want to reshape values before they leave, post-processing with Python lets you apply your own rules. See Airparser Python post-processing, and for the file side, how to convert PDF to Excel automatically.

The Airparser Parsed Data and Export view listing documents with extracted values and a JSON panel showing the line items array
Parsed Data lists every document with its extracted values. Open a row to see the JSON, or use Export to download all rows.

For a quick one-off conversion of a digital PDF, there is also a free PDF to Excel converter that turns each detected table into a sheet. It does not read scans. For scans, repeated documents, or automation, use an Airparser inbox.

Your documents often contain personal and financial data. Airparser encrypts data in transit and at rest and lets you set how long documents are kept, as described in how Airparser protects your documents.

Frequently asked questions

How can AI extract tables from PDF documents?

An AI parser reads the page, finds the table, and returns each row with the column names you defined. A vision engine looks at the page layout directly, which helps with merged cells, wrapped text, and scans.

What is the best way to extract tables from a PDF?

For one clean table, copy and paste or a free converter is enough. For tables that keep arriving in different layouts, for scans, or for automation, use a parser that reads the page layout and lets you define the columns once. Test it with your messiest file.

Which AI tool can extract tables from PDFs and turn them into editable spreadsheets?

Look for a tool that returns named columns, handles multi-page tables, and exports XLSX or CSV. Airparser does this: you define a List (Table) field, send documents, and export from Parsed Data or send rows to Google Sheets and other tools.

Can AI extract tables from scanned PDFs?

Yes. A vision engine reads the scanned page as an image and keeps table positions. Very blurry or tiny text can still be misread, so review the results.

How do I extract a table that spans multiple pages?

Define one table field and describe the behavior in plain language: the header repeats on every page and the table continues until the last row. Then compare the extracted total with the document total to confirm that no row was lost. In our tested example, a table spanning pages 1 and 2 came back with all 63 rows.

How do I handle merged cells and section headings?

Describe what they mean. Say that section heading rows are not products and should be skipped, or that a merged category heading applies to the rows below it. In our test, section headings and subtotal rows were excluded this way.

Which AI document software can extract tables from financial statements?

Choose software that handles tables across pages and lets you check totals. Airparser parses bank statements and financial documents into rows. See bank statement data extraction.

How do I extract text and tables from PDFs at scale for an AI app?

Send documents to an inbox through the API and receive structured JSON back. See how to parse documents via API.

Can I extract a table without writing a template?

Yes. You describe the columns instead of drawing zones or rules over a layout, so there is no template to rebuild when a sender changes the design.

How do I get table data into Excel?

Open Parsed Data and use Export to download XLSX, CSV, or JSON, choosing the table field as the source. You can also send the rows to Google Sheets or other tools automatically.

What file types can Airparser read besides PDF?

PDFs, including scanned ones, images (JPG, PNG, BMP), Word documents, text, HTML and Markdown files, emails (EML), and Excel and CSV files.

Bottom line

Tables fail when a tool treats a page as a flat stream of text. Reading the layout, describing columns instead of drawing templates, telling the parser which rows to skip, and checking totals turn table extraction into something you can run on every incoming document.

If you handle tables regularly, try Airparser's PDF table parser with a few of your own PDFs and see the rows it returns.