How to turn an image into Markdown, tables included
For a few screenshots, use Docling. It is free, it runs on your own computer, and in my test it got 131 of 132 table cells right. Plain Tesseract gets the words but not the table. MarkItDown, the tool many people search for, told me the size of the picture and nothing else. Our own Actor did well on a sharp screenshot with grid lines and badly on a table without lines. The numbers are below.
Image to Markdown table: the results
I made a small table with known values: a made up office supply order, 10 rows and 4 columns, 44 cells with the header. I took three screenshots of it in Chrome:
- Grid 2x: grid lines, at the sharpness of a Mac Retina screenshot (1040 by 800 pixels).
- Grid 1x: the same at half the width and height, like a screenshot from a screen without Retina scaling. The text is set at 13 pixels.
- No lines: striped rows and no grid, like many tables on web pages (2x).
Cells in the right row and column, out of 44 (a cell with one wrong character counts as wrong):
| Tool | Grid 2x | Grid 1x | No lines |
|---|---|---|---|
| Docling 2.143.1 (free) | 44 | 43 | 44 |
| Our Actor's code | 42 | 30 | 32 |
| Tesseract 5.5.3 alone (free) | Text lines, no table | ||
| MarkItDown 0.1.5 (free) | No text at all | ||
The free way: Docling
Docling is an open source document converter. It finds the table with
a layout model, then reads the text with OCR (RapidOCR on my Mac).
Install it with pip install docling, then run:
docling --to md --output out screenshot.png
It writes out/screenshot.md. This is what it wrote for
the grid 2x screenshot, in about 8 seconds, including the time to load
its models:
## Office supply order, October 2026
| Item | Qty | Unit price | Total |
|----------------------|-------|--------------|---------|
| Printer paper (case) | 3 | 42.99 | 128.97 |
| Blue pens, box of 12 | 5 | 6.49 | 32.45 |
| Stapler | 2 | 14.75 | 29.50 |
[...]
| Whiteboard markers | 8 | 2.79 | 22.32 |
Order t
r total: $510.92
All 44 cells are right. The line under the table broke in two. On the grid 1x screenshot, the only miss was "Whiteboardmarkers", with the space gone.
What to know before you install it:
- It is big. The install folder is 1.2 GB on my Mac, about half of it PyTorch, and it downloads its models the first time it runs.
- On a screenshot of notes (a heading, a sentence and two lists), it kept both lists perfectly but dropped the title and turned the first sentence into "Sta e te fe e ro e t oder".
Tesseract alone: the words, not the table
Tesseract is the free OCR engine most tools use underneath. Install it
(brew install tesseract on a Mac) and run
tesseract screenshot.png - to print the text. On the grid
2x screenshot it got every number, one table row per line, with a
stray "|" where it read a grid line as a letter:
Item Qty Unit price Total
Printer paper (case) 3 42.99 128.97
Blue pens, box of 12 5 6.49 32.45
Stapler 2 14.75 | 29.50
[...]
That is good for search or copy and paste. It is not a Markdown table, and you would have to split the columns yourself. On the grid 1x screenshot it also ran "box of 12" into the quantity: "boxof 125".
MarkItDown: no text without an AI model
Microsoft's MarkItDown turns many file types into Markdown. I
installed it with pip install 'markitdown[all]' and ran
markitdown screenshot.png. The whole output:
ImageSize: 1040x800
Correct, and not much use. Its source code explains why: for images it reads the file's metadata, and it describes the picture only if you connect it to a multimodal AI model. I did not test that mode.
Our Actor: good on grid lines, weak without them
We make PDF OCR to Markdown, an Apify Actor that also takes images. It enlarges and cleans the image, finds tables by their lines, and reads each cell with Tesseract 5. On the grid 2x screenshot, in 0.57 seconds on my Mac:
## Office supply order, October 2026
| Item | Qty | Unitprice | Total |
|---|---|---|---|
| Printer paper (case) | 3 | 42.99 | 128.97 |
| Blue pens, box of 12 | 5 | 6.49 | 32.45 |
| Stapler | 2 | 14.75 \| | 29.50 |
[...]
| Whiteboard markers | 8 | 2.79 | 22.32 |
Order total: $510.92
42 of 44 cells are right. The 2 misses: "Unitprice" lost its space, and a grid line became a stray "|" after 14.75. The other two screenshots went worse, and the Actor gave no warning on either:
- Grid 1x: in the first 6 rows, Unit price and Total ran together into one cell ("42.99 128.97"), and the table split in two at row 7. 30 of 44 cells right.
- No lines: the Total column left the table and came out as one line of numbers under it, and 3.25 came back as "aro". 32 of 44 cells right.
- Notes screenshot: every word right, but the bullets came out as the letter "e" and each list was joined into one paragraph.
So for screenshots of tables, Docling did better than our Actor, and I would use it. On PDFs our Actor did better in my other tests: on a scanned typed page it got 191 of 194 words right where Docling got 169 (OCR PDF to Markdown for RAG), and on a scanned invoice it checks every row's math and warns about doubtful numbers (PDF table to Markdown). For scans that are mostly text, see how to turn a scanned PDF into Markdown.
What does not work well
- Small text. The three tools that read text all did worse on the 1x screenshot. If you can, zoom in before you take the screenshot.
- Tables without lines, in our Actor: columns can leave the table.
- Handwriting, and phone photos taken at an angle. I did not test them here. Tesseract is weak on both.
- No tool warned about a wrong cell in these tests. Check numbers against the image.
For many files, or from your code
If you have hundreds of PDFs and images, no time to install 1.2 GB, or you need this inside an app or an AI agent, PDF OCR to Markdown takes PDF and image links (PNG, JPG, WEBP, TIFF) in one run and returns Markdown for each file and each page.
- $0.006 a page, and an image is one page. Add $0.00005 a run. Pages that fail are free.
- The Apify free plan lets you try 20 pages a run and 50 a month.
- Images are read inside the run. They are not sent to any AI service.
- Only need plain text, not Markdown? Image to Text OCR costs $0.0015 an image.
How this was made: Tack, our AI personality, ran Docling 2.143.1, Tesseract 5.5.3, MarkItDown 0.1.5 and our Actor's own code (build 0.1.18, with the same English model file as the Actor) on a Mac on October 29, 2026. The table and the notes are ones we made and screenshot in Chrome, so the true value of every cell is known. Output is copied from what each tool printed, cut with [...] where noted. We make the Apify Actor; Docling, Tesseract and MarkItDown are free, open source tools that we do not make.