To convert a PDF to CSV, extract the table with a tool that reads rows and columns, then save it as comma-separated text. Excel's Get Data > From PDF, the free Tabula app, Python (Camelot or pdfplumber) and the ASHDOCS PDF to Table API all do this for text-based PDFs. Scanned pages need OCR first.
If you've ever pasted a PDF table into Google Sheets and watched every row land in column A, you know why this post exists. Then comes the cleanup: a header repeated on every page, refunds written as ($84.99), an é that comes back as é, and 10/03/2026, a different day in Chicago than in Leeds.
Which PDF to CSV method should you use?
Pick by how often the PDF arrives and whether it has a text layer (if you can select words, it has one). Excel or Tabula covers a one-off, a monthly report justifies a Python script, and PDFs that should reach a sheet untouched belong in an API step.
| Method | Handles scans? | Borderless tables? | Bulk / automation? | Free? | Best for |
|---|---|---|---|---|---|
| Excel: Get Data > From PDF | Not documented | Not limited to ruled ones | Folder connector | No, part of Microsoft 365 | One-off reports on Windows |
| Tabula | No | Yes, stream mode (--stream in tabula-java) | tabula-java --batch | Yes (MIT) | A few files, on your own computer |
| Python: Camelot or pdfplumber | No, add a text layer first | Yes: Camelot stream/network, pdfplumber text strategy | Yes, it's a script | Yes (MIT) | Developers wanting cell-level control |
| ASHDOCS PDF to Table API | After OCR (ASHDOCS OCR API) | Yes, ruled and borderless | Yes, one HTTP call from code, Zapier or Make | Free test key; 2 credits per live call | Recurring PDFs in an automation |
How do you convert a PDF to CSV in Excel?
In Excel for Microsoft 365 on Windows, go to Data > Get Data > From File > From PDF, select the file and pick a table in the Navigator. Select Load, or Transform Data to clean it in Power Query first. Then use File > Save As, with CSV UTF-8 (Comma delimited) as the file type.
The steps follow Microsoft's import guide. Check your version first: Microsoft's Power Query version table includes the PDF connector (it needs .NET Framework 4.5+) in Microsoft 365 plans on Windows but not Office 2016 or 2019, doesn't list Excel 2021 or 2024, and has no PDF entry for Excel for Mac. Excel for the web lists PDF only for SharePoint and OneDrive work or school files.
Two Power Query defaults help: MultiPageTables is on, so "similar tables on consecutive pages will be automatically combined into a single table", and EnforceBorderLines is off, so ruling lines are hints, not hard cell edges (Pdf.Tables reference). The PDF connector page points to the Folder connector for many PDFs, and Save As writes only the active sheet to the CSV.
How do you extract PDF tables to CSV for free?
Use Tabula, a free, open-source app for Windows, Mac and Linux. Upload the PDF, drag a box around the table, select Preview & Export Extracted Data, check the preview, then export it as CSV. Tabula's site says it works only on text-based PDFs, not scanned documents.
Tabula runs in your browser at http://localhost:8080, served from your own computer. Windows and Linux need Java, which the Mac download bundles. For bulk jobs, tabula-java has --pages all (page 1 is the default), --lattice or --stream for ruled or unruled tables, and --batch. The Tabula repo says the desktop app is "unlikely to see updates from us in the near future"; tabula-java still gets bug-fix releases.
Got a folder of PDFs? Send one to the ASHDOCS PDF to Table API on a free test key: it runs the real extraction and never uses credits.
How do you convert PDF to CSV with Python?
Install pdfplumber or Camelot with pip, read each page's tables and write the rows with Python's csv module. pdfplumber hands you raw rows to clean yourself; Camelot returns table objects with a parsing report and exports straight to CSV. Both need the PDF's text layer.
pdfplumber: clean rows as you extract
pdfplumber (MIT license) "works best on machine-generated, rather than scanned, PDFs". This script fills merged cells, skips repeated headers and writes plain numbers and ISO dates; on 23 Oct 2026 (pdfplumber 0.11.10, Python 3.13) it ran cleanly on a two-page sample statement and wrote the "after" file below.
import csv
import re
import pdfplumber
def to_number(text):
"""'$1,250.00' -> '1250.00' and '($84.99)' -> '-84.99'"""
t = text.strip()
negative = t.startswith("(") and t.endswith(")")
t = re.sub(r"[^\d.-]", "", t)
return "-" + t if negative and not t.startswith("-") else t
def to_iso(us_date):
"""'10/2/2026' -> '2026-10-02' (US month-first dates)"""
m, d, y = us_date.split("/")
return f"{y}-{int(m):02d}-{int(d):02d}"
header, rows, prev = None, [], None
with pdfplumber.open("statement.pdf") as pdf:
for page in pdf.pages:
for table in page.extract_tables():
for raw in table:
# None means a merged cell: reuse the value from the row above
row = [(prev[i] if cell is None and prev else cell or "")
.replace("\n", " ").strip()
for i, cell in enumerate(raw)]
if not any(row):
continue # blank spacer row
if header is None:
header = row
elif row != header: # skip the header repeated on later pages
rows.append(row)
prev = row
with open("statement.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.writer(f)
writer.writerow(["date", "description", "amount", "balance"])
for date, desc, amount, balance in rows:
writer.writerow([to_iso(date), desc, to_number(amount), to_number(balance)])
In testing, pdfplumber returned None under merged cells (hence prev) and kept line breaks inside wrapped cells (hence replace). On a borderless table the default "lines" strategy found nothing, while table_settings={"vertical_strategy": "text", "horizontal_strategy": "text"} found it, plus spacer rows the script skips.
Camelot: export with a quality check
import camelot
tables = camelot.read_pdf("statement.pdf", pages="all", copy_text=["v"])
for table in tables:
print(table.parsing_report) # accuracy, whitespace, page and more
tables.export("statement.csv", f="csv")
Camelot (MIT license, pip install camelot-py) reads page 1 only unless you pass pages="all", and its default lattice flavor expects ruled tables; borderless ones need flavor="stream" or "network" (API reference). copy_text=["v"] copies merged-cell text down, and export() writes one file per table, so the two-page test statement became two CSVs. On image-only PDFs, the advanced usage page says Camelot reports zero tables and suggests OCRmyPDF first.
How do you convert PDF to CSV with an API?
Send the PDF to a table extraction endpoint and ask for CSV. With the ASHDOCS PDF to Table API, that's one multipart POST to /api/v1/tools/pdf-to-table with options={"output_format":"csv"}. It reads ruled and borderless tables, merges tables that run across pages when you set merge_tables to true, and gives each table a confidence score.
curl -X POST https://www.ashdocs.com/api/v1/tools/pdf-to-table \
-H "X-API-Key: ash_test_YOUR_KEY" \
-F "files=@statement.pdf" \
-F 'options={"output_format":"csv"}'
The response is a JSON job; the CSV is a file at the signed link output_files[0].url, which the Zapier and Make steps below map.
ash_test_ keys never expire or use credits, yet return the real CSV within plan rate limits; a live call costs 2 credits (pricing page). Files are kept 24 hours by default, or purged within minutes of the job finishing if you add "retention":"zero" to options (or flip the account-wide switch), which is worth doing for bank statements.
There's also a dedicated Bank Statement to CSV API (3 credits per run, counted against your plan's extraction allowance). Scans go through the OCR API first (3 credits); its searchable PDF can go straight to PDF to Table. For named fields such as invoice number and total, the invoice data extraction API takes your own schema, and extracting data from a PDF compares the routes.
Run that curl on one of your own PDFs and open the CSV it links to; a test key never uses credits.
Why does my CSV look wrong after converting a PDF?
Because a PDF stores where text sits, not what kind of data it is, an extractor can get every row right and still hand you strings: currency signs, thousands separators, negatives in parentheses, month-first dates and repeated headers. CSV has rules too; RFC 4180 wants commas and line breaks inside a field quoted.
Before (an illustration of the usual faults):
Date,Description,Amount,Balance
10/03/2026,Refund, order 1182,($84.99),$4,095.51
Date,Description,Amount,Balance
10/07/2026,Café Olé,($18.75),"$3,864.36"
After (two rows the script above actually wrote):
date,description,amount,balance
2026-10-03,"Refund, order 1182",-84.99,4095.51
2026-10-07,Café Olé,-18.75,3864.36
Line 2 of the "before" has six fields, not four: the unquoted commas in "Refund, order 1182" and "$4,095.51" split them. RFC 4180 says every line should hold the same number of fields, fields containing commas, double quotes or line breaks go in double quotes, and an inner quote is doubled ("b""bb"). Python's csv writer handles the quoting.
Merged cells, wrapped cells and repeated headers
A merged cell comes out once with blanks below it, so fill it down: Table.FillDown in Power Query, copy_text=["v"] in Camelot, or the prev lookup above. A wrapped cell keeps its line break (legal only inside double quotes) or splits into an extra row; swap the break for a space, or group close rows with Camelot's row_tol. For a header repeated on every page, keep the first and drop later exact matches.
Currency symbols, thousands separators and negatives
$1,250.00 and ($84.99) are strings, and what they become depends on whatever reads them; in Python, float("(84.99)") raises a ValueError. Keep only digits, the decimal point and the minus sign, turn accounting parentheses into a minus, and write 1250.00 and -84.99, as to_number() does.
Dates
10/03/2026 is October 3 in the US and 10 March in the UK. Write YYYY-MM-DD, the full-date form in RFC 3339, which has one reading. Wrong dates can also vanish quietly: Airtable's CSV import extension carries on and leaves the cell empty when a date field can't read the value.
UTF-8 and the Excel BOM
Save CSVs as UTF-8; read as Windows-1252, Café Olé becomes Café Olé. Microsoft says Excel opens a UTF-8 CSV normally if it was saved with a BOM (byte order mark, the bytes EF BB BF at the start); otherwise, import it through Data > Get Data > From File > From Text/CSV, and save from Excel as CSV UTF-8 (Comma delimited), the type Microsoft names in its CSV encoding steps.
Code pays for the BOM: read as plain utf-8 in Python, the first header becomes \ufeffDate, and the codecs docs say "the use of the BOM is discouraged and should generally be avoided" in UTF-8. Write utf-8-sig for files people open in Excel and plain utf-8 for automations, then read with utf-8-sig, which accepts both.
How do you automate PDF to CSV in Zapier or Make?
Post the PDF to a table extraction API from an HTTP step, turn the CSV into rows, then write them to a sheet. In Zapier: Webhooks by Zapier (POST), Formatter's Import CSV File, then Google Sheets' Create Multiple Spreadsheet Rows. In Make: HTTP > Make a request, a CSV parsing step and a Google Sheets row module.
The ASHDOCS Zapier app (public beta) and n8n node (n8n-nodes-ashdocs, verification pending) have no PDF to Table action, and there's no Make app yet, so use HTTP (on n8n, the HTTP Request node). See ASHDOCS for Zapier, ASHDOCS for Make and the n8n integration page.
Zapier
- Trigger: the app that receives the PDF, such as a new email attachment or a new file in a Drive folder.
- Webhooks by Zapier, POST to the endpoint above, with your key in an
X-API-Keyheader, the PDF from step 1 asfilesandoptionsset to{"output_format":"csv"}. Zapier's webhooks guide says to send files with POST or PUT, and lists Webhooks by Zapier on Professional, Team and Enterprise plans, not Free. - Formatter by Zapier > Utilities > Import CSV File, with CSV File set to the signed
output_filesURL (a file or public URL works). It outputscsv_textandline_items; the Import CSV File guide caps files at 150 KB, around 1,000 rows of a 10-column CSV, and test runs show only the first 50 line items. - Google Sheets > Create Multiple Spreadsheet Rows, which Zapier lists with line item support. Map each line-item field to its column.
Make
- A trigger module that outputs the PDF, such as Google Drive, email or a webhook.
- HTTP > Make a request. Store your key in an API key keychain placed in the header, with
X-API-Keyas the parameter name (Make's API key docs). Use method POST and Body content type multipart/form-data; the API expects the PDF in a part namedfilesand a text partoptionsset to{"output_format":"csv"}. Set Parse response to Yes (HTTP module docs) sooutput_filescan be mapped. - HTTP > Make a request again, method GET, on that URL to download the CSV, then parse it into one bundle per row.
- Google Sheets > Add a Row per bundle, or Bulk Add Rows (advanced). Set Value input option to User entered so Sheets parses values "as if typed into the Google Sheets UI"; Raw stores them as provided (Make's Google Sheets modules).
FAQ
Can Google Sheets convert a PDF to CSV?
Not directly. Google Sheets' File > Import takes .csv, .tsv, .txt, .xls, .xlsx, .ods and similar files, but not .pdf. Convert the PDF to CSV first, then use File > Import and choose Append rows to current sheet. A spreadsheet can hold up to 20 million cells.
Can you convert a scanned PDF to CSV?
Yes, after OCR. Tabula and Camelot work only with text-based PDFs, and pdfplumber works best on machine-generated ones, so add a text layer first with OCRmyPDF (Camelot's suggestion) or the ASHDOCS OCR API. Then extract the table and check the totals against the original.
Is there a free way to convert PDF to CSV?
Yes. Tabula, Camelot and pdfplumber are free and open source (MIT license), while Excel's From PDF import comes with paid Microsoft 365 plans. ASHDOCS test keys are free and never use credits; live PDF to Table calls cost 2 credits each.
Why does my CSV show strange characters in Excel?
It's an encoding mismatch. Microsoft says Excel opens a UTF-8 CSV normally when the file was saved with a BOM; without one, import it through Data > Get Data > From File > From Text/CSV. When saving from Excel, choose CSV UTF-8 (Comma delimited) as the file type.
How do I keep a table that spans several pages as one CSV?
In Excel, Power Query's MultiPageTables option combines similar tables on consecutive pages and is on by default. In Python, loop over every page, keep the first header and skip later rows that match it. The ASHDOCS PDF to Table API merges multi-page tables in the same call when you set merge_tables to true.
Turn your next PDF into a clean CSV without opening a spreadsheet. Get a free ASHDOCS test key, send one PDF to PDF to Table and check the rows yourself.