What is preserved
- Headings inferred from font size and weight
- Paragraph breaks
- Lists
- Reading order across a page
Convert text-layer PDFs to Markdown in your browser. No upload, no server. Scanned PDFs need OCR and are not supported.
PDF is a page description format: it records where glyphs sit on a page, not what they mean. There are no heading tags and no paragraph boundaries, so any converter has to infer structure from font sizes, spacing and position. file2md reconstructs headings and paragraph breaks from that layout and emits Markdown, which works well on documents produced by a word processor or a typesetting system.
Structure inferred is not structure known, and the difference shows. A hyperlink keeps its visible words but loses the URL behind them, because the address lives in an annotation beside the text rather than in it. Footnote markers and bodies arrive as ordinary lines, since nothing on the page marks them as footnotes. And text that was set apart in a box on the page can be promoted to a heading it never was, with the paragraph it interrupted landing after it. If the word processor original still exists, convert that instead.
The one thing it cannot do is read a scan. A PDF produced by a photocopier or a phone camera holds an image per page and no text at all; extracting words from it requires OCR, which is not part of this tool. If your PDF returns an error here, try selecting text in a PDF reader — if nothing highlights, it is a scan.
Structure is inferred from layout, so it can be inferred wrongly: text sitting in a box on the page can be promoted to a heading, and the paragraph it interrupted can end up after it. Convert the original word processor file instead whenever you still have it. Image-only PDFs (scans) are not supported: OCR is out of scope. Encrypted PDFs must have their password removed first.