PDF to Markdown
Turn a PDF into a Markdown export of its words, with paragraphs rebuilt and headings guessed from the shape of each line.
What this tool does
PDF to Markdown runs pdftotext over your document with layout preservation switched on, then rewrites what comes out as Markdown. Blank lines in the extract decide where one paragraph ends and the next begins, and the wrapped lines inside a paragraph are joined back into a single line, so the .md reflows in an editor instead of keeping whatever line breaks the printed page happened to need. That join is indiscriminate about page boundaries: unless a break happens to land after a blank line, the last line of one page and the first line of the next are pulled into the same paragraph. Each PDF returns one file named after the source, and the result reports the character count.
Infer headings from font sizes is the only setting, and the check behind it is worth knowing. The extracted text carries no font information at all, so the decision is made on the shape of a line: a block under 80 characters that begins with a capital or a digit and contains no lowercase letter anywhere is promoted, and it is written as a level-two heading — ## — regardless of where it sits in the document. A Title Case line is therefore left alone, and an all-caps heading pressed straight against its first paragraph, with no blank line between them, is absorbed into that paragraph instead of promoted. Switch the setting off and nothing is promoted at all. One mark goes in either way, and no control governs it: where a page break in the extract begins a block of its own, a --- rule is written in front of that block, which is why a few page boundaries surface as horizontal rules and most leave no trace.
Only the words cross over. Weight, type size, colour, links, list markers and images have no representation in extracted text, so nothing in the output marks them. Tables fare worst: pdftotext holds the columns apart with runs of spaces, and then the paragraph join puts consecutive rows on one line, which reads as a long run of words rather than a grid. Extract Images pulls the pictures out of the same document, and PDF to Excel is the tool that attempts a grid. Characters that mean something in Markdown — a leading hash, an asterisk, an underscore — are passed through unescaped, so a rule or a bullet the original drew with punctuation can render as formatting you did not ask for.
Conversion happens on the server, never in the tab. The PDF travels there over an encrypted connection, the extraction and the rewriting happen on that machine, and the upload, the .md and the job record holding your setting are removed together once the short retention window passes. Three ceilings apply: a document over 300 pages is refused with its page count, the job is stopped if it runs past two minutes, and each file is accepted up to 200 MB. A scan is refused as well — with no text objects to read there is nothing to convert, and the message says so and names PDF OCR — while an encrypted file never reaches the extractor, because the page count is read first and that read is what fails. Clear the password with Unlock PDF before converting.
How to use it
- Add the PDF. One job runs per file, so several documents can go in together and each returns its own .md carrying the source filename. The 200 MB limit and the 300-page ceiling apply to each of them separately.
- Decide about the headings. Left on, short lines with no lowercase letters in them become ## headings. Switch it off when the document is full of capitalised labels, part numbers or legal headers you would rather keep as body text.
- Let the extraction run. Progress is reported while the text is pulled out and rewritten. A document with no text layer is stopped and named rather than handed back as an empty Markdown file.
- Review before you publish. The result carries a note that the headings were inferred. Expect to add the levels below ##, rebuild any tables by hand, and bring images in separately.
Processing & privacy
Secure server processing. This operation requires temporary server processing.
Common use cases
Moving a document into a docs repository
A specification that exists only as a PDF cannot be reviewed in a pull request. Markdown can be, and once the paragraphs are rejoined it diffs line by line.
Pasting into a wiki or a ticket
Most trackers and wikis accept Markdown directly, so the text lands with its paragraphs intact rather than as a wall of broken lines from a viewer's selection.
Quoting from a printed report
The wording is the part worth keeping. Converting first gives you editable prose to cut and rearrange without fighting the layout it was set in.
Feeding a static site generator
Hugo, Jekyll and Eleventy all read .md files. This gets the body text into that shape; the front matter and the heading hierarchy are yours to add on top.
Questions
Is my PDF uploaded?
Why were some of my headings missed?
Do tables and images come through?
Can it convert a scanned PDF?
Why does an encrypted PDF fail before any text is pulled out?
How is this different from PDF to Text?
How long a document can it take?
Related tools
- Merge PDF — Combine several PDFs into one document in the order you choose.
- Split PDF — Split one PDF into separate documents by page range.
- Compress PDF — Reduce PDF file size while preserving the quality that matters.
- PDF to JPG — Export every page of a PDF as a JPG image.
- JPG to PDF — Turn one or many JPG photos into a single PDF.
- Protect PDF — Add a password and set permissions on a PDF.