All articles

AcademyDefinitive guide

How to convert PDF to Markdown without a mess

6 min readReviewed 16 October 2026

how to convert pdf to markdown: laptop and financial documents on a desk
Photo by Yan Krukau on Pexels. Editorial photograph.

To learn how to convert PDF to Markdown, start with the source. Work out what the PDF contains. A digital document may offer a usable text layer. A scan needs OCR. Both can look tidy but put text in the wrong order. This guide explains the choice and shows useful output. Check headings, page breaks and tables before you save. The aim is an editable document you can trust, rather than a long block of text that happens to end in .md.

First, distinguish text-layer PDFs from scans

Try selecting a sentence in a PDF viewer. If selection follows the words and copies sensible characters, there is probably a useful text layer. If you can only select the page as an image, recognition may be needed. Some documents mix the two. Others have an old OCR layer whose words do not quite match the visible scan. Check several pages, not just the cover.

The pypdf extraction guide is blunt: “pypdf is no OCR software”. Its explanation shows why extracting existing characters and reading pixels are distinct jobs. A digital text layer may keep the letters correctly. It can still lack the structure for paragraphs, headings and tables. Check that structure as a separate step.

Avoid rasterising a clean digital PDF just to feed it through OCR. You would turn known characters into pixels that need to be read again. Equally, do not blame a text extractor for returning nothing from a scan. Identify the source type first, then choose a tool that handles it. This small diagnostic step is often more useful than trying another converter at random.

Choose a route that matches the document

For an occasional whole document, use a converter that can read the file directly. In Lass0, choose Open Document from the menu, select the file and use the Markdown result. The document instructions describe the accepted formats and failure messages. Screen capture is useful for one visible section, but it is a clumsy substitute for reading a long file page by page.

If you need to keep a searchable PDF rather than create Markdown, that is a different output. OCRmyPDF's introduction explains its text-layer approach for scanned files. Do not confuse adding searchable text to the original pages with recovering a clean hierarchy for a notes repository. Both are valuable; they solve different problems.

Think about processing location too. An upload converter may be convenient for public material. For internal documents, check your organisation's rules and the service's actual data handling before uploading. Local extraction avoids that upload step, but local history, backups and the final destination still need consideration. The offline OCR guide helps separate those parts of the workflow.

How do I convert a PDF to Markdown step by step?

Keep an untouched source copy. Open the document and inspect the cover, a normal body page and a page with a table or columns. Note the structure you expect. Convert the whole file, choose Markdown and paste into a local editor. Compare the start, middle and end before assuming that a successful completion message means every page was handled correctly.

Review the hierarchy from the top. A document title should not turn every line underneath it into a heading. A running page header should not appear as a new section on each page. Paragraphs split by page breaks should join where the sentence continues. Separate sections should stay separate. Use the visible PDF to decide, rather than smoothing every blank line automatically.

Next, inspect lists and tables. Numbered steps need the right order. Check which steps belong under others. For a table, keep units and footnotes. Check each cell against its header. Finally, inspect the end of the file. Missing final paragraphs are easy to miss when the introduction looks excellent. Save the checked document with a source filename or reference so you can trace a future question back to the original.

Table: a conversion review sheet. This is a suggested checklist, not a benchmark of any product.

Source featureUseful Markdown resultReview question
Document titleOne clear top headingIs the title complete?
Two text columnsCorrect reading sequenceDoes a sentence jump columns?
Running page headerRemoved or clearly separatedIs it interrupting paragraphs?
Table across pagesVerified rows under one headerWere any rows lost or repeated?
FootnoteLinked or labelled noteIs its condition still visible?

A worked example: a report with a split table

Imagine an illustrative report whose table starts on page two and ends on page three. Page three repeats the column headers. A naive conversion can treat that second header as a data row, or lose the last row on page two. The result may still render as a perfect Markdown table. Rendering success tells you about syntax, not completeness.

Count source rows on each page. Add them together without counting repeated headers. Compare that total with the output. Check a value immediately before and after the page break, then the final row. If the table has a total, recompute it from verified cells. A matching total is a useful check. It cannot prove every value is in the right row.

Read the caption and footnotes last, with the table beside them. “Amounts in thousands” changes every number. An asterisk can limit a category or explain a missing value. Keep those details near the table in the Markdown. The PDF-table guide goes deeper into merged cells, repeated headers and the limits of pipe-table syntax.

Why does PDF text lose its reading order?

A page describes where things appear, which does not always provide the order a reader expects. A sidebar may be stored among body text fragments. A two-column page may be extracted across the width. A footer can land in the middle of a sentence. These failures can survive spellcheck because every word is individually correct.

Read the first few paragraphs aloud. Sudden changes of subject, unfinished sentences and repeated headers often reveal a layout issue. For a small problem, recapture or correct the affected section against the original. For a large problem, try a different extraction route or obtain the source document. Do not hide substantial reconstruction work behind a claim of automatic conversion.

Can Markdown keep every PDF feature?

No. Markdown is a text structure, not a replacement for fixed page layout. Some features need another format. These include complex maths, multi-level tables, forms and notes. Images and exact type styles may need the source too. A source link or companion PDF can carry information that the text export cannot. Decide what the future reader needs before choosing which elements to simplify.

Also check the target renderer. Table support, footnotes and heading IDs differ between Markdown systems. A file may look right in one editor. In another, it may need changes. Keep a plain source file and preview it in the actual destination. If the goal is model input, the PDF-to-Markdown for LLM guide covers provenance and section boundaries.

Finish with a short acceptance rule: all pages represented, important values verified, reading order sound and limitations recorded. Start with a public or non-sensitive file through Lass0's PDF conversion workflow. Convert one representative document, inspect it carefully and use the results to decide whether the workflow fits the rest of your collection.

For a collection of files, keep a simple conversion register with the source name, review status and unresolved layout issues. Mark a file complete only after its difficult pages have been checked. That record tells you what has been checked. A folder of exports with vague names cannot do that.

Questions, answered

Is OCR required for every PDF-to-Markdown conversion?

No. A useful existing text layer can be extracted directly. Scanned pages need OCR, and mixed files may require both approaches.

Can Markdown preserve a table across PDF pages?

It can represent the recovered rows, but you must check repeated headers, missing cells, units and page-break continuity against the source.

Why does the output repeat page headings?

Running headers can be mistaken for document sections. Remove repetitions only after checking that they do not carry unique context.

Put it into practice.

Explore the related Lass0 workflow or download the app to try it with a non-sensitive example.