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 situation | What to do | Why |
|---|---|---|
| The PDF has selectable text | Export it to Word, then convert the .docx | Text is already available, so the export only needs to recover the structure |
| The PDF is scanned | Run OCR in the OmniDoc PDF editor, then export to Word | Scanned pages are images; without OCR there is no text to convert |
| The PDF has many tables | Export to Word, then check every table by hand | Tables are a common place where structure is lost in Markdown |
| You need a README or a web page | Convert to Markdown, then add links and code blocks manually | Markdown is plain text, so you add formatting that a PDF never had |
| You only need the text | Export to Word, copy the plain text, and trim the layout | Plain 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
- 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.
- 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.
- 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.
- 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.
- 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. - 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.
- 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.
- 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.
| Check | How to see it | If it's wrong |
|---|---|---|
| Headings | Open the preview and scan the outline | Add or remove # markers to match the section levels in the PDF |
| Tables | Compare each table against the original page | Rebuild the table in Markdown, or keep it as a simple list if the columns are too complex |
| Lists | Look for numbered and bulleted items | Fix the marker characters so each item starts on its own line |
| Special characters | Search for odd symbols such as broken quotes or dashes | Re-save as UTF-8 and replace characters that did not carry over |
| Images and figures | Check whether image links point to real files | Save the images separately and update the links |
| Accuracy of the text | Read the key paragraphs side by side with the PDF | Correct 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.


