PDF to CSV with AI: from a text PDF to a checked spreadsheet
To turn a PDF table into CSV with AI, use a text PDF, name the columns you want, download the .csv, and check the rows against the page.
Updated
Which PDFs turn into CSV, and which don't?
The PDF to CSV tool works on text PDFs: files where you can select a table with your cursor and copy it. A model reads that text layer and writes the rows back as CSV, one block per table, each with its page number.
It fails on three kinds of file. Scans have no text layer. Photos of a page have none either. And some PDFs draw a table as an image even though the rest of the page is text, so the numbers look like text but aren't. There's no OCR in the tool. For any of these you'll see "No text found", or a table that's simply missing from the answer.
Quick test: drag across one row of the table. If single cells highlight, you're fine. If one rectangle lights up, it's a picture. Then ask whoever issued the document for a spreadsheet or CSV export, because an export from the source beats anything extracted from a PDF.
Two more things before you start. The cap is about 5.7 MB per PDF. And the file goes to the model provider you picked, so think about whether this one should leave your device. A password-protected file has to be re-saved without the password first.
What are the steps?
Say you have a 6-page bank-style statement with made-up data: a header with an account holder, then about 90 transactions with a date, a description, an amount and a balance. That's an example, not a real file.
- Open the tool and add the PDF. The app may ask you to sign in first.
- Type which table you want and which columns (the next section has wording).
- Choose CSV and check the cost line. The default model, Claude Haiku 4.5, is 5 Gems per message.
- Run it. The answer streams in, one block per table, each labelled with its page.
- Click "Download .csv", then run the checks further down before you use the file.
For the statement, expect a block per page or per table fragment, because a table that crosses a page break often arrives in pieces. You'll join them in your spreadsheet, or ask for one combined table in a follow-up. Every follow-up sends the whole file again and costs another 5 Gems.
How do I ask for the columns I want?
Naming the columns is the biggest lever you have. Without it the model guesses which table matters and what to call things. With it you get a header row you can actually use.
Give the exact column names in the order you want them. Say what to skip, such as a summary box or a page footer. Say how to write dates and numbers. And tell it to leave a cell empty rather than guess, because a blank is easy to spot and a plausible wrong number isn't.
For the statement example, that means Date, Description, Amount, Balance; skip the summary on page 1; dates as YYYY-MM-DD; amounts as plain numbers with a dot as the decimal separator and a minus sign for money going out.
Prompts for the statement example
Extract the transactions table as CSV with exactly these columns: Date, Description, Amount, Balance. One row per transaction. Skip the account summary and any page footers. No commentary inside the block.
Use the tool aboveWrite dates as YYYY-MM-DD. Write amounts as plain numbers with a dot as the decimal separator and a minus sign for money out. If a cell is unreadable, leave it empty instead of guessing.
Use the tool aboveOnly use pages 1-2. Same columns as before. Add the page number as a last column called Page.
Use the tool aboveCSV or Markdown, and what does the download button do?
Pick CSV when the data is headed for a spreadsheet or a script. Pick Markdown when you want to read the table in the chat or paste it into a note. Markdown is easier on the eyes. CSV is the one other programs open. If you're unsure, go with CSV; it's readable enough in the preview.
The "Download .csv" button saves the CSV from the answer as a file on your device. It saves the model's text as it is. It doesn't repair anything, so a short row or a wrong date goes into the file too. Open the first lines before you do anything else with it.
What about long tables?
One answer is capped at about 1,500 words (2,048 tokens; on the free plan, smart models get 1,024). A table with a few hundred rows hits that cap, and the block just stops, sometimes in the middle of a row. A PDF also counts as roughly 6,000 input tokens, so very long files get cut or refused.
The fix is to go page range by page range: pages 1-2, then 3-4, then 5-6. The tool cuts the range out on your device first, so only those pages leave it. Ask for the same columns every time, and say "no header row" after the first batch so you can paste the pieces together. Each range is one message, so three ranges of the statement cost 15 Gems on the default model. The same logic applies to text, and how to summarize a long PDF walks through ranges in more detail.
Which five checks should I run?
A model can drop a row or misread a digit and still hand you a tidy file. Spend two minutes on these.
- Row count. Count the rows on the page, or use the statement's own count if it prints one. Compare with the rows in the CSV. A gap usually sits at a page break.
- Column totals. Add up a numeric column and compare with the total printed in the document. For the example statement, money in minus money out should match the change in balance.
- First and last row. Open the page and read the first and last row against the CSV, cell by cell. Do it for each page range too.
- Dates and decimal separators. Look for 03/04 versus 04/03, and for 1,250.00 versus 1.250,00. A comma used as a decimal mark can split one number into two columns.
- Merged cells. A label that spans several rows on the page often lands only on the first row, or gets repeated on all of them. Check those rows by hand.
If a check fails, say what's wrong in the chat and ask for the affected pages again. You don't need to rerun everything.
Why does my CSV land in one column?
In many European and Brazilian setups the spreadsheet's list separator is a semicolon, not a comma. Double-clicking a comma file then puts each whole row into column A.
The file is fine. Open the spreadsheet first, then use its text import (in some programs it's under Data, From Text/CSV, in others File, Import) and choose the comma as the delimiter. Set the column for dates to the format you asked for, and keep the amounts column as numbers. If the numbers still look like text, check the decimal separator from the fourth check above.
Once the columns look right, save a copy in the spreadsheet's own format and keep the downloaded .csv as your raw version. For questions about a PDF rather than a table, how to chat with a PDF is the next read.
Questions about PDF to CSV with AI
Can I convert a scanned PDF table to CSV?
Not here. The tool reads the text layer, and a scan or a photo of a page has none. There's no OCR, so you'll see "No text found". Ask the sender for a text PDF or a spreadsheet export.
Why did my table stop halfway down?
One answer is capped at about 1,500 words, so a long table gets cut off. Run the file again in page ranges, such as pages 1-2 and then 3-4, with the same columns each time, and join the pieces.
Should I choose CSV or Markdown?
Choose CSV if the data is going into a spreadsheet or a script, since it comes with a "Download .csv" button. Choose Markdown if you only want to read the table in the chat or paste it into notes.
How much does a table extraction cost?
The default model, Claude Haiku 4.5, is 5 Gems per message, and the cost shows before you run it. A table split into three page ranges is three messages, so 15 Gems in total.
Why does my CSV open in a single column?
Your spreadsheet probably expects a semicolon as the list separator, which is common in many European and Brazilian setups. Use the spreadsheet's text import instead of double-clicking, and pick the comma as the delimiter.