How do I turn a PDF into Markdown for notes or an AI tool?
Upload a PDF and get Markdown with a heading for each page, ready to copy or download as a .md file. Bold text, links and images are left out, and tables come out as plain lines. When AI OCR is available, scans are read by it, up to the first 8 pages by default. Check any names and numbers it reads.
Can it convert a scanned PDF?
Yes, when AI OCR is available. A file that averages under 30 characters of text per page is treated as a scan. Images of the first 8 pages are sent to an AI model, which reads the text. Check names, figures and dates against the original, because OCR can misread them.
Do tables and headings come through?
Not as real Markdown. Font size and weight are not read, so a large printed title becomes an ordinary line. Tables come out as tab-separated lines, which most Markdown apps show as one run of text. Add | separators by hand if you need a proper table.
Is my file sent to an AI provider?
Only when it looks like a scan. A PDF with a normal text layer, like our 10-page typed report, is converted entirely on our server. For scans, images of the pages being read go to the OpenAI API. The uploaded PDF and those images are deleted when the request finishes.
A real conversion, line for line
The test page has a small header line, a large title, two short columns of text side by side and a three-row table with ruled borders. This is page 1 of what the converter returned:
Markdown output, page 1
# pump-station-inspection ## Page 1 Harbour Works Ltd - internal Pump Station Inspection Left column. The intake screen was cleared on arrival. Flow resumed within ten minutes and the level alarm reset without a fault code. Right column. Bearing temperature on pump two read high. The unit was isolated and a replacement bearing was ordered. Asset Reading Status Pump 1 41 C OK Pump 2 78 C Isolated Screen Clear OK
What that output tells you about the converter
- The top heading is the file name without
.pdf, not the title printed on the page. - Each page gets its own
## Page Nheading when the PDF has more than one page. A page with no text is written as*No text on this page.*so page numbers stay in step with the original. - The printed title came out as an ordinary line. Font size and weight are not read, so no
##heading is created from large or bold text. - The table came out as tab-separated lines, not a Markdown pipe table. Most Markdown renderers will show it as a single run of text, so rebuild it with
|separators if you need a table. - Lines break where they broke on the page, and the two columns came out one after the other because that is the order they were stored in this file.
Cleanup applied to the text
- Windows and old Mac line endings are changed to plain line feeds.
- Spaces and tabs at the end of a line are removed.
- Three or more line breaks in a row are reduced to one blank line, which Markdown treats as a paragraph break.
- Nothing else is changed: bold, italics, hyperlinks and images are not carried over, and no list markers are added.
When the converter switches to OCR
The converter first reads the embedded text layer. It then divides the total number of characters by the number of pages. Only when that average is under 30 characters per page does it treat the file as scanned and try AI OCR: Ghostscript renders the pages as JPEG images and an OpenAI vision model reads them. The decision is made for the whole document, not page by page.
| Document | Average characters per page | Method |
|---|---|---|
| Our 10-page typed report | About 2,900 | Text layer only; nothing is sent to an AI provider. |
| Scan with no text layer | 0 | AI OCR, if it is available. |
| Our 3-page scan with one tiny hidden line of text | 11.7 (35 characters in total) | AI OCR, because the average is under 30. |
| 20 typed pages with 1 scanned page added | Still far above 30 | Text layer only; the scanned page shows as having no text. |
Limits of the OCR step
- Only a capped number of pages is rendered for OCR; the code default is the first 8 pages. When a scan is longer, the result says how many pages were processed.
- AI OCR can misread names, figures and dates. Check anything you will rely on against the original page.
- Images of the pages being read are sent to the OpenAI API. Files that have a usable text layer are converted entirely on our server.
- If OCR is unavailable and the file has some text, you get the text layer anyway. When we ran our scan without OCR, pages 1 and 2 came back as
*No text on this page.*and page 3 held only the hidden line.
Messages you may see
OCR could not read this PDF right now.The file had no usable text and the OCR step could not run or failed. Our password-protected test file gave exactly this message, because neither the parser nor Ghostscript could read it without the password. Unlock the file and try again.No readable text found in this PDFas the method label: neither the text layer nor OCR produced anything.You have used today’s conversion allowance.Guests and Free accounts can convert 10 PDFs a day and Pro and AI accounts 100. This allowance is separate from the daily checks used by other tools.
Getting the result out
The Markdown is sent straight to your browser. Copy it, or download it as a .md file named after your PDF. The page also shows the page count, word count and which method was used. The uploaded PDF and any page images rendered for OCR are deleted when the request finishes.
Last updated . How the sample was produced: we built a two-page inspection report with TCPDF, uploaded it under the name pump-station-inspection.pdf to the same converter service this page uses, and copied the Markdown it returned. The scan and encrypted-file results come from the same service with OCR switched off.