PDF to Markdown

Convert PDF text content to Markdown.

What PDF to Markdown helps you do

Turn a PDF's extracted text into a Markdown file with a title and light heading detection. Short standalone blocks become level-two headings, while longer blocks stay as paragraphs. It is a fast starting point for moving PDF content into a docs system, not a layout-aware converter.

Conversion runs in your browser. The document is not sent to Haivix servers.

How it works

A PDF stores positioned drawing instructions rather than flowing paragraphs, which is why editing one is different from editing a document. Page content, fonts, images and annotations are separate objects, and a page only carries a text layer if the producer wrote one. Most tools here rebuild or render the file in your browser with pdf-lib and pdf.js; the formats that need a full office engine, such as Word, Excel, PowerPoint, PDF/A and HTML, use the Haivix service and say so in their privacy note. Every tool writes a new file and leaves the original untouched. Because content is placed by coordinates, extraction often returns text runs in visual order rather than sentences, and columns or tables can arrive interleaved.

How to use PDF to Markdown

  1. Load the PDF and run the conversion.
  2. Review the headings, which are guesses based on block length.
  3. Fix any heading that should be body text and any paragraph that should be a heading.
  4. Copy the Markdown or download the .md file.

When to use it

  • Move a PDF guide into a Markdown-based documentation site.
  • Convert a report into editable Markdown for a repository.
  • Reuse PDF copy in a CMS that accepts Markdown.
  • Get a rough first draft of a document for editing.
  • Move plain-text content into a README.
  • Extract text for a search index with basic structure.

When not to use it

  • Do not expect tables, lists or images to be reconstructed.
  • Do not use it on scanned PDFs without OCR first.
  • Do not treat the heading guesses as the document's real outline.

Example

A PDF with a short bold heading and a long paragraph becomes an H2 heading followed by body text. A short line that happens to be body copy can be promoted by mistake because the rule is based on length and punctuation, not font size. Lists are flattened into paragraphs, and tables lose their columns.

What you can do with PDF to Markdown

  • Extract text from the whole PDF.
  • Add the file name as a level-one heading.
  • Promote short standalone blocks to headings.
  • Keep paragraph breaks between blocks.
  • Copy the result or download a .md file.
  • Run the conversion locally in the browser.

Example: work on a copy and check the output

Keep the original file. These tools produce a download rather than editing in place, so a failed operation never damages the source.

Check whether the PDF has a real text layer before relying on extraction. A scan is an image, so text tools return little or nothing until OCR has run.

Unlock encrypted files first. A password-protected PDF cannot be reordered, cropped or annotated until it has been opened with the correct password.

Review the output before sending it on. Fonts can substitute, overlays do not always remove what is underneath, and page boxes can shift content near the edges.

Note the page size and orientation before laying anything out. A mixed document can contain portrait and landscape pages, and a tool that assumes one size may crop or offset the others.

Keep a note of the operation and its settings. If a recipient questions the result, reproducing it from the original is faster than guessing which options were used.

What to know before you start

  • Complex layouts, tables and images do not map cleanly to Markdown and need manual cleanup.
  • Scanned PDFs without a text layer produce empty or minimal output.
  • Heading detection is a length heuristic, not font or style analysis.
  • Lists, links and emphasis are not reconstructed.

Common mistakes

  • Assuming the converter reads font sizes or bookmarks.
  • Expecting a bulleted list to stay a list.
  • Running it on a scan and getting almost nothing.
  • Publishing the output without fixing heading levels.

Troubleshooting

If the output is nearly empty, the PDF has no text layer; run OCR first.

If a heading is wrong, the block-length rule misfired; edit it manually.

If paragraphs are merged, the source lacked blank lines between blocks.

If tables are scrambled, the text runs were extracted in visual order rather than cell order.

Related standards and documentation

  • ISO 32000-2 defines the PDF format and its object model.
  • ISO 19005 defines PDF/A profiles for long-term archiving.
  • ISO 14289 defines PDF/UA accessibility requirements.
  • The PDF Association publishes technical notes on page boxes, annotation types and text extraction.
A copy, not an edit
  • Keep the source file.
  • Check for a text layer.
  • Unlock before editing.
  • Inspect the result.