How to Convert PDF to Markdown Step by Step

Learn how to convert PDF to Markdown in four stages: check the PDF, export it to Word, convert the Word file, and verify the Markdown output.

If you need to how to convert pdf to markdown, you probably want the text of a report, paper, or manual in a plain-text format that you can version in Git, publish on a static site, or paste into a README. PDF is built for printing, not for editing, so the text is locked into page positions. Markdown stores only the structure: headings, paragraphs, lists, links, and tables written as plain characters.

There is no single click that turns a PDF into a clean Markdown file. The reliable route is two steps. First, export the PDF to a Word file, which keeps the paragraphs and tables in an editable form. Then convert that Word file to Markdown with a general converter or a text editor that supports Markdown. This article walks through that workflow, shows what to check at each stage, and explains what to do when the output looks wrong.

How do you convert a PDF to Markdown? The short answer

Export the PDF to Word with OmniDoc, then convert the Word file to Markdown and review the result. The Markdown step is a general conversion, so the quality of the final file depends on how clean the Word export is.

Your situationWhat to doWhy
The PDF has selectable textExport it to Word, then convert the .docxText is already available, so the export only needs to recover the structure
The PDF is scannedRun OCR in the OmniDoc PDF editor, then export to WordScanned pages are images; without OCR there is no text to convert
The PDF has many tablesExport to Word, then check every table by handTables are a common place where structure is lost in Markdown
You need a README or a web pageConvert to Markdown, then add links and code blocks manuallyMarkdown is plain text, so you add formatting that a PDF never had
You only need the textExport to Word, copy the plain text, and trim the layoutPlain text skips the Markdown conversion, but you lose headings and lists

Before you start

Gather a few things before you convert. Each one changes how much cleanup you will need later.

  • The original PDF. Keep an untouched copy. If an export goes wrong, you can start over without losing anything.
  • A rough sense of the PDF's structure. Note whether it has numbered sections, bullet lists, figures, and tables. Those elements decide how much you will rebuild by hand.
  • Access to the OmniDoc desktop client. The PDF export and OCR steps run in the desktop client, which you can download from download.omnidoc.top. The PDF editor there covers OCR, page operations, and export to Word.
  • A Markdown-capable editor or converter. You need a tool that reads .docx files or lets you save plain text as .md. You can use any general-purpose option for this stage.
  • A plan for images. Markdown can reference images by path, but it does not embed them the way Word does. Decide whether you will save figures separately and link to them.

Converting a PDF to Markdown, step by step

  1. Check whether the PDF has selectable text. Open the file and try to select one line of body text with your cursor. If the selection highlights only the words you dragged over, the page has a text layer. If you cannot select anything, the page is probably an image.
  2. Run OCR on scanned pages. If the check fails, open the PDF in the OmniDoc desktop client and use the PDF editor's OCR feature. This adds a searchable text layer so the export has words to work with. Make sure OCR runs on every page that needs it.
  3. Export the PDF to Word. In the PDF editor, use the export option and choose Word. Save the .docx file to a new folder so the original PDF stays unchanged.
  4. Review the Word file before converting. Scroll through it and look at headings, lists, and tables. Fix obvious problems now, such as paragraphs split in the wrong place or a heading that became plain body text. Cleaning the Word file is faster than cleaning Markdown later.
  5. Convert the Word file to Markdown. Open the .docx in a general converter that outputs Markdown, or in a desktop editor that can save a document as plain Markdown text. Choose the option that keeps headings as # markers and tables as Markdown tables.
  6. Save the output as a .md file in UTF-8. Choose a plain-text encoding, not a rich-text format. UTF-8 keeps accented letters, curly quotes, and non-Latin characters intact across editors.
  7. Open the .md file in a Markdown preview. Check the rendered page, not only the raw text. Headings, lists, and tables should look the way they did in the PDF.
  8. Fix the remaining issues by hand. Rebuild any table that broke, correct heading levels, add code fences where needed, and fix line breaks inside paragraphs. If you want to edit the Markdown in a browser, the UniDoc web editor at app.unidoc.top includes Markdown support.

Check the result

Once you have the .md file, check these points before you publish or commit it.

CheckHow to see itIf it's wrong
HeadingsOpen the preview and scan the outlineAdd or remove # markers to match the section levels in the PDF
TablesCompare each table against the original pageRebuild the table in Markdown, or keep it as a simple list if the columns are too complex
ListsLook for numbered and bulleted itemsFix the marker characters so each item starts on its own line
Special charactersSearch for odd symbols such as broken quotes or dashesRe-save as UTF-8 and replace characters that did not carry over
Images and figuresCheck whether image links point to real filesSave the images separately and update the links
Accuracy of the textRead the key paragraphs side by side with the PDFCorrect the words manually; OCR and conversion can both make mistakes

Check the important content, such as numbers, names, and quoted text, against the original PDF. Text recovered from scanned pages through OCR deserves the closest reading.

Choosing a free converter

Many readers search for a free way to make this conversion. You can use a free converter, but judge it by the criteria below rather than by its price tag.

  • File size and page limits. Some free tools reject long documents or cap the number of pages.
  • Watermarks or branding. Check whether the output file includes marks you cannot remove.
  • Upload privacy. If the PDF contains unpublished or confidential text, read how the tool handles uploaded files before you send them.
  • Table handling. Convert a page with a complex table first and check the result. Tables are where free tools usually differ most.
  • Output format. Confirm that the tool saves plain .md text, not a file wrapped in another format.

❓ FAQ

1. Can I convert a PDF directly to a .md file?

Not in one step with OmniDoc. The workflow is to export the PDF to Word first and then convert that Word file to Markdown. The second step is a general conversion, so the output is only as clean as the Word file you start with.

2. What is the difference between PDF to Markdown and PDF to Markdown text?

A .md file is a Markdown document, with symbols such as # for headings and - for list items. Plain Markdown text is the same content saved as text without a file extension. For most uses, save the output as a .md file so editors and preview tools recognize the structure.

3. Why does my Markdown table look broken?

Tables are the hardest part of this conversion because Markdown has no layout engine. Merged cells, multi-line cells, and wide tables often fail to convert. Rebuild the table by hand, or keep the data as a list if the table structure is too complex to represent.

4. Do I need OCR before exporting a scanned PDF?

Yes, if the pages are images. Without a text layer, the export has no words to place into the Word file, and the Markdown will be empty or unusable. Run OCR in the OmniDoc PDF editor first, then export.

📝 Summary

To convert a PDF to Markdown, export the file to Word with OmniDoc, then convert that Word file using a general converter. Check the PDF for selectable text first, and run OCR if it is scanned. Finish by checking headings, tables, and special characters in a Markdown preview.

Open OmniDoc to edit Markdown and export to Word

Updated 2026-11-04