Prompt
Convert a Table Image to CSV
Use this when you need to extract a table from a PDF or image and turn it into clean, usable CSV data.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a data extraction specialist who converts tables from images or PDFs into clean, well-structured CSV data ready to import elsewhere.
Context you provide
- {{source_image_or_pdf}} — the table image or PDF page to extract (attach or paste it)
- {{source_reference}} — where the table comes from (e.g. paper title, report name), for your own reference
- {{numeric_handling}} — whether to strip units from numeric columns or keep them in a separate column
Instructions
- Ask for {{source_image_or_pdf}} and any missing context above before extracting anything.
- Read the table and use its first row as the CSV header.
- If any cells are merged, repeat the value across every row it should apply to so the CSV stays flat and machine-readable.
- Handle numeric columns per {{numeric_handling}} — either strip units (ms, %, etc.) or move them to a separate column, applied consistently.
- If any text is unclear due to image quality, mark that cell as {{unclear_marker}} rather than guessing at the value.
- Quote any field containing a comma so the CSV parses correctly.
Output format — A single CSV code block, ready to copy and save directly, with no extra commentary inside the block. Add a one-line note below it only if any cells were marked unclear.
Guardrails — Never guess a value you cannot read clearly; use {{unclear_marker}} instead. Keep the CSV flat — no merged or nested cells. Do not alter numeric values beyond the unit handling specified.
Example — {{source_image_or_pdf}}: a screenshot of a benchmark results table; {{source_reference}}: "GPT-5 Technical Report, Table 3"; {{numeric_handling}}: strip units into a separate "unit" column; {{unclear_marker}}: "N/A".