FastBankConvertFastBankConvert home

PDF Table to Markdown for Notes and Docs

By FastBankConvertPublished October 17, 2026

To turn a PDF table to Markdown, first get the table out of the PDF as clean rows, then write it as pipe syntax: a header row, a row of dashes, and one line per data row. Put a colon on the right of the dashes under number columns so amounts line up, and escape any pipe inside the text.

What does a Markdown pipe table need?

A Markdown pipe table needs a header row, a delimiter row made of dashes, and the data rows, each written as cells between pipe characters. Notes apps, wikis, code hosts and many chat tools render this form, which is defined in the GitHub Flavored Markdown spec.

The spec sets a few rules that decide whether your table renders or shows up as raw text:

  • The header row and the delimiter row must have the same number of cells. If they differ, the spec says the table is not recognised at all.
  • Body rows can be short or long. Missing cells are filled in as empty, and extra cells are ignored, so a row with an extra stray pipe quietly loses its last value.
  • Cells hold inline text only. Bullet lists, headings and other block elements cannot go inside a cell.

The last rule matters for PDF tables more than you might think. A PDF cell that holds two printed lines, such as a payee name with an address below it, has to become one line of text in Markdown.

Getting the PDF table text out before the Markdown step

The Markdown step is easy once you have the table as rows and columns; the hard part is getting there from the PDF. Copying from a PDF viewer often gives you one long line or values in the wrong order. Convert the table to a spreadsheet, CSV or HTML first, check it, and only then write the Markdown.

A spreadsheet is the most forgiving middle step, because you can see each cell and fix it. If the table is going to a web page anyway, turning a PDF table into an HTML table may be the more direct route, and many Markdown renderers accept raw HTML tables as well.

Look at the converted rows before writing any pipes. Check that the column count is the same on every row, that wrapped text was joined rather than split into extra rows, and that amounts kept their decimals. Bank tables from some countries print numbers in their own grouping style. Indian bank statements, for example, group digits in lakhs and crores, such as 1,25,000.00, and you may want to keep that style in notes for readers who expect it.

FastBankConvert is getting ready to open, built to convert PDF bank statements to Excel, CSV or JSON, which would give you clean rows to start from; you can get started to hear when it opens.

Right-aligned number columns in a Markdown table

Number columns in a Markdown table line up properly when you right-align them, which you do by putting a colon at the right end of the dashes in the delimiter row, as in ---:. A colon at the left end aligns left, and a colon at both ends centres the column. Text columns read best left-aligned.

Right-aligning amounts matters because readers compare numbers by their last digits. With 12.50 and 1,240.00 in one column, left alignment puts the 1 of each number under each other, which makes the larger one look smaller at a glance. Right alignment lines up the decimal points, provided every amount has the same number of decimals.

A worked example

Here is a five-row example table, with made-up values, written as a first draft of Markdown straight from the converted rows:

| Date | Description | Amount | Balance |
| --- | --- | --- | --- |
| 2026-06-01 | Opening balance | | 2,400.00 |
| 2026-06-03 | Hardware Store | Paint | -64.20 | 2,335.80 |
| 2026-06-10 | Client payment | 1,250.00 | 3,585.80 |
| 2026-06-18 | Phone bill | -48.99 | 3,536.81 |
| 2026-06-25 | Bank fee | -5.00 | 3,531.81 |

Two things are wrong with it as Markdown. The second row's description, "Hardware Store | Paint", contains a pipe, so that row has five cells and its balance falls off the end. And the amount columns are left-aligned. The fixed version, as Markdown source:

| Date       | Description               |   Amount |  Balance |
| ---------- | ------------------------- | -------: | -------: |
| 2026-06-01 | Opening balance           |          | 2,400.00 |
| 2026-06-03 | Hardware Store \| Paint   |   -64.20 | 2,335.80 |
| 2026-06-10 | Client payment            | 1,250.00 | 3,585.80 |
| 2026-06-18 | Phone bill                |   -48.99 | 3,536.81 |
| 2026-06-25 | Bank fee                  |    -5.00 | 3,531.81 |

The padding spaces are optional; renderers ignore them. They are there so the source stays readable in a plain text editor, which is half the point of Markdown.

Pipes, line breaks and blank cells inside Markdown table text

Pipes, line breaks and blank cells are the three things inside cell text that break a Markdown table row. A pipe in the text must be escaped with a backslash, as \|, which the spec allows even inside other inline formatting. A line break must be removed or replaced, and a blank cell still needs its two pipes.

Pipes

Bank descriptions use pipes more than you would expect, as separators between a merchant name and a reference. Search the text for every pipe and add a backslash before it. If you build the table with a formula or a script, do this replacement before joining the cells.

Line breaks

A cell that spans two printed lines in the PDF often arrives with a line break inside it. In Markdown, a line break ends the row, so the second half of the text becomes a broken row of its own. Replace each break with a space. Some renderers accept <br> inside a cell if you really need two lines, but plain spaces work everywhere.

Blank cells

An empty cell is written as two pipes with nothing, or only spaces, between them. Do not skip it. The opening balance row in the example has no amount, and leaving out that cell would shift the balance into the amount column.

Is the PDF table too long for a Markdown table?

A PDF table is too long for Markdown when it runs past a screen or two of rows, or has more columns than fit across a page. Markdown tables suit a short summary in notes or chat. They have no sorting, totals or frozen headers, so a statement of a few hundred lines is hard to read.

A few signs that you need another format:

  • More than about 30 rows. Readers lose the header as they scroll, and nothing pins it in place.
  • More than six or seven columns. Rows wrap on narrow screens and stop looking like a table.
  • You want to query it. Questions like "every payment over 500 last quarter" need a database or a spreadsheet. Loading PDF table data into SQL suits data you want to filter and join repeatedly.

A practical split is to keep the full table in a spreadsheet and paste only a short excerpt into your notes as Markdown, with the totals row and a link to the full file. The note stays readable, and the numbers live where they can be checked.

All posts in CSV, JSON and text output