TinyFileLab

Home›PDF›PDF to Markdown

Nothing is uploaded — it all runs on your device

PDF to Markdown converter

Read a PDF and write it out as Markdown with real headings, lists and tables, ready for your notes app, docs site or prompt. Converted in your browser; the file never leaves your device.

Drop a PDF here or tap to choose — text-based PDFs, any length

Choose a PDF and its Markdown appears below. Nothing is uploaded.

Headings become # headingsFont sizes are turned into levels, so the outline survives the trip.
Tables become GitHub tablesGap-separated columns come out as pipe tables that render everywhere.
Nothing leaves your deviceRead and converted in this page; paste it into your notes or your prompt.

From coordinates to Markdown

Markdown is the plain-text format that notes apps, documentation sites, static-site generators and, increasingly, language-model prompts all understand. A PDF is the least Markdown-like thing there is: it knows where every glyph sits on the page and nothing about what any of it means. Getting from one to the other takes two steps, and both happen in this page.

First the text is recovered from each page, with its position and font, by running the page’s drawing instructions. Then the lines are read for structure. A line set in a size clearly larger than the body text becomes a heading: the largest such size is #, the next ##, the next ###, and anything smaller still is ### too, because deeper levels in a PDF rarely mean anything. A short bold line on its own becomes a heading at the next level down. Lines starting with a bullet or a number become - and 1. list items, indented when the PDF indented them. Consecutive lines whose words are separated by the same number of wide gaps become a GitHub-flavoured pipe table, with a bold first row as its header. Everything else is a paragraph, with wrapped lines joined and hyphenated words glued back together.

Bold and italic are taken from the font names in the file and written as **bold** and *italic*. Characters that Markdown would otherwise interpret — asterisks, underscores, square brackets, a # at the start of a line, a number followed by a full stop at the start of a line — are escaped with a backslash, except inside URLs, which are left exactly as they were so that links stay clickable when the Markdown is rendered.

Headers, footers and page breaks

Printed documents carry a title or chapter name at the top of every page and a page number at the bottom. In Markdown those are noise: a document that says “Annual Report 2024 · Page 7” between every two paragraphs is unreadable and, if you are feeding it to a model, wastes tokens on nothing. Lines that repeat at the same height on most pages (digits allowed to vary) and lines that are only a page number are removed by default. Tick the option to keep them if the header carries something you need, such as a document reference.

By default the output also forgets where the pages ended, so a paragraph that ran over a page break is one paragraph again. If you need the page boundaries — to cite a page, or to split the text later — tick A horizontal rule where each page ended and a --- is written between pages.

Where this is useful

  • Notes. Paste a paper or a report into Obsidian, Logseq, Notion or Bear with its headings intact, so the outline view works and you can link to sections.
  • Documentation. Move a PDF manual into a docs site or a wiki. Headings become the navigation, tables render as tables.
  • Language models. Models read Markdown far better than raw PDF text: headings tell them what a passage is about, tables stay tables instead of dissolving into a word soup, and the escaped characters do not trip up the rendering of their replies. Removing headers and footers also means you are not paying for the same running title two hundred times.
  • Version control. Markdown diffs; PDFs do not. A contract or spec converted once can be tracked line by line from then on.

What does not come across

Images are not extracted; a chart in the PDF simply is not there in the Markdown. Scanned pages yield nothing, because they contain no text, and the report under the output says which pages those were rather than leaving you to wonder. Code blocks are not recognised: a listing in a monospace font comes out as paragraphs, since there is no reliable way to tell code from a tabulated address. Footnotes appear as plain paragraphs where the page drew them. Multi-column pages come out in the order the file draws them, which is usually the reading order but occasionally is not. Complex tables — wrapped cells, merged cells, rules without gaps — are written as one paragraph per row. Links inside the PDF are annotations rather than text, and are not turned into [text](url); a URL that is written out on the page is kept verbatim and most renderers make it clickable anyway.

Checking the result

The quickest check is to look at the headings: if the # lines match the document’s own section titles, the size analysis worked and the rest will be sound. If a document uses one font size throughout and marks sections only with bold, you will see ## headings from the bold-line rule. If it uses neither, you get paragraphs only, which is the honest answer. The PDF to text tool gives the same text without any structure, and the PDF to Word tool writes the same structure as a .docx; all three run from the same extraction.

Common questions

Does it upload my PDF?

No. The PDF is read in your browser by this page's own code and the Markdown is produced there too. There is no server involved; the page keeps working with the network switched off.

Why would I convert a PDF to Markdown rather than to text?

Plain text throws away the headings, lists and tables. Markdown keeps them in a form that notes apps, wikis, static-site generators and language models all understand, while still being plain text you can edit anywhere. If you only want the words, the PDF to text tool is simpler.

How are headings decided?

By font size. The most common size in the document is the body text; each distinct larger size becomes a heading level, biggest first, down to ###. A short bold line standing alone also counts as a heading. A PDF set entirely in one size with no bold produces no headings, because there is nothing to go on.

Do tables come out as Markdown tables?

Yes, when the columns are separated by clear gaps on the page: consecutive lines with the same number of gaps become a pipe table, and a bold first row becomes the header. Tables with cells that wrap onto several lines are written as one paragraph per row instead.

Are special characters escaped?

Yes. Asterisks, underscores, backticks, square brackets, angle brackets and a leading #, -, + or "1." are escaped with a backslash so they render as typed. URLs are never escaped, so links stay intact.

Can I convert only some pages?

Type a range in the Pages box, such as 3, 1-5 or 2,7,10-. Page numbers are positions in the file counting from 1, not the numbers printed on the pages.

What about scanned PDFs or PDFs with images?

Scanned pages contain no text and produce nothing; the report lists them. Images in a text PDF are not extracted. There is no OCR here.

Is this good for feeding documents to ChatGPT or Claude?

That is one of its main uses. Models read Markdown structure well, headers and footers that would repeat on every page are stripped so you are not paying tokens for them, and tables survive as tables. Keep the page-break rules on if you want the model to be able to cite page numbers.